|
What kind of problem do you have?
Maybe it's the lifetime of the authentication cookie (if Forms Authentication)
Maybe ...
I'm not good at guessing, we need more information first...
-^-^-^-^-^-
no risk no funk
|
|
|
|
|
I wanted to display the message box with yes and no button.on the button click event.
for that i am writing the following code.
Dim Msg As String<br />
Dim Icon As Integer<br />
Dim Title As String<br />
Dim Buttons As Integer<br />
Dim Ans As MsgBoxResult<br />
' Fill Message string<br />
Msg = "Are you sure you want to exit?"<br />
' Set dialog Title<br />
Title = "Logout"<br />
' Set icon to critical (X)<br />
Icon = vbQuestion<br />
' Set buttons to abort, retry and ingnore<br />
Buttons = vbYesNo<br />
'Buttons = Buttons + vbDefaultButton2 'set default button to retry<br />
<br />
Ans = MsgBox(Msg, Buttons + Icon, Title)<br />
'alternatively, simply<br />
'Ans = MsgBox(Msg, vbAbortRetryIgnore + vbDefaultButton2 + vbCritical, "Msgbox Example - Abort Retry Ignore")<br />
<br />
' If the user clicked Retry, try again<br />
If Ans = MsgBoxResult.Yes Then<br />
Session("pass") = ""<br />
Response.Redirect("http://136.72.0.5/infoserver/home.htm")<br />
<br />
End If
This code is producing the error.......
Showing a modal dialog box or form when the application is not running in UserInteractive mode is not a valid operation. Specify the ServiceNotification or DefaultDesktopOnly style to display a notification from a service application.
|
|
|
|
|
You cannot use MsgBox in Web Application. The MsgBox will show up while running from VS2005, but when you deploy it in IIS it won't show up. So use JavaScript to do so...
|
|
|
|
|
Hi Venkatesh ...
can u provide some code to show the message box using the java script .I need two buttons there Yes and No.and further i need to write some code on yes and no.
|
|
|
|
|
You can use JavaScript "Confirm" box ( Syntax: var res = confirm('Are you sure?'); ) which would have "OK" and "Cancel". But if you still want "Yes", "No" then, I too have to write new code (not possible right now).
|
|
|
|
|
In my project i need to get session idleness bcz if he is not touching the application for few time i need to redirect him to some other page so how can i get the session idle time it might be using session or any state management.Please answer i am waiting it's urgent.
Nagaraj S
|
|
|
|
|
Hi...
I think if the particular session state expires these session("particular") automaticaly becomes nothing or ""
then use the following code.
if(Session("particular")is nothing)
esponse.redirect("Nagaraj.aspx")
|
|
|
|
|
Thank you Sonia ji,
You told after session expiration but i am telling before the session expiration.
Session.Timeout=20;
If it is the condition i need to check the session idleness before 20 min. For example In gmail if you are not performing any task the color of the indicator in chatting list will be changed. I think you got my point
|
|
|
|
|
i was proving my authentication (user name and password in the login page).
Presently i am doing coding work into the code behind file.It seems to be a very slow process.
Is there any way to do the same process in java script or vb script.so as to reduce the access speed.
|
|
|
|
|
Iam uploading files using FileField control. It is working fine. Now I have Path of the up-loadable file in a variable. How to up-load it.
The original syntax is:
HttpPostedFile FileValue1 = Browse1.PostedFile;
But now iam using :
HttpPostedFile FileValue1 = strVal; //strVal is a string wer I have got the path of the file.
But iam getting the error cannot convert string to HttpPostedFile
wat can be the solution for this.......
Thank You.
|
|
|
|
|
hello Rahul,
if u have a virtual path then u can try upload with the
server.mappath("address")
just pass the value to the method and file will be uploaded to server,
check following link,
http://support.microsoft.com/kb/323245[^]
regards,
koolprasad2003
If the message is useful for U then please Rate This message...
Be a good listener...Because Opprtunity knoughts softly...N-Joy
|
|
|
|
|
Hi prasad,
I am having the another doubt. As I know the destination server path, what I need is to pass the source path with out using browse button.
How do I do that?
Rams.
Be simple and Be sample.
|
|
|
|
|
hello rams,
just us the file upload control and get the physical pat and pass that path to server.mappath control,
just follow link
http://support.microsoft.com/kb/323245[^][^]
regards,
koolprasad2003
If the message is useful for U then please Rate This message...
Be a good listener...Because Opprtunity knoughts softly...N-Joy
|
|
|
|
|
Hi,
I have created a class in my business layer, that contains several functions that fetch data from database. For opening and closing connection i have used the constructor and destructor of the above class. The code segment below depicts that. But i have got an error when the application runs. It fires in the destructor, from the line
sqlcon.Close();<br />
The Error Message is...
Invalid operation exception was unhandled.
Internal .net Framework Data Provider Error 1
what could be the reason?
<br />
public DLNuERPMain()<br />
{<br />
sqlcon.ConnectionString = strConnNuERPv2;<br />
if (sqlcon.State.ToString() == "Closed")<br />
{<br />
sqlcon.Open();<br />
}<br />
}<br />
~DLNuERPMain()<br />
{<br />
if (sqlcon.State.ToString() == "Open")<br />
{<br />
sqlcon.Close();<br />
}<br />
}<br />
awaiting for your valuable Suggestions........
Thanking you in advance
Sebastian
|
|
|
|
|
You should explicitly close the SqlDataReader when you are done using it, before finalization. If you do that and are still running into problems, post back again with a new error message and call stack (if they have changed).
For Details look at MSDN:
SqlDataReader Close Method[^]
Regards,
Satips.
|
|
|
|
|
Hi,
Thank you very much......
Best Regards
Sebastian
|
|
|
|
|
Glad to Help always.
Regards,
Satips.
|
|
|
|
|
My aspx page is trying to connect to a remote server with SQL Server 2000 installed on it, the ip of the server is 172.16.3.111 and the same is the instance of SQL Server, sql server is running in SQL Server Authentication mode, user id is "test" and password is "test123", name of database is myDB,the connection string which I am providing is as follows:
data source=172.16.3.111\172.16.3.111;user id=test;password=test123;initial catalog=myDB;"
But I am getting the following exception:
SQL Server does not exist or access denied.
even if I try the following connection string:
"data source=172.16.3.111;user id=test;password=test123;initial catalog=myDB;"
than also I get the same exception
Can u please tell whats the problem,is the connection string correct,the DBA has also registered me "test" as a user on the SQL server.One thing which I want to mention is that through enterprise manager I can connect and use sql server without any problems,also please note that in VS.NET when I try connecting using server explorer and test the connection than I connect successfully, than why is problem occuring in connecting throug aspx page.
|
|
|
|
|
|
anystudent wrote: data source=172.16.3.111\172.16.3.111;user id=test;password=test123;initial catalog=myDB;"
The problem might be because of the 2 ip addresses provided. And also check the colon which you have provided in the Syntax.
Regards,
Satips.
|
|
|
|
|
Hi,
I have exported my data in gridview to excel sheet but i have a problem to format the excel cell through my code. my gridview data has line break in some of the column , when exported to excel, it will occupy few rows instead, I need to format the data such that each order will occupy one row for easy data auditing.
I'm using this code to export the data:
string filename = System.Configuration.ConfigurationManager.AppSettings["ExcelFilename"];
string style = " .style0 {vertical-align:top;} ";
// all roles exported turn off paging and rebind the grid before sending it to export
this.GridView1.AllowPaging = false;
this.GridView1.DataSource = (DataView)Session["OrderList"];
this.GridView1.DataBind();
DisableControls(GridView1);
Response.Clear();
Response.AddHeader("content-disposition", string.Format("attachment;filename={0}.xls", filename));
Response.Charset = "";
Response.ContentType = "application/vnd.xls";
StringWriter stringWrite = new StringWriter();
HtmlTextWriter htmlWrite = new HtmlTextWriter(stringWrite);
this.GridView1.RenderControl(htmlWrite);
//style is added dynamically
Response.Write(style);
Response.Write(stringWrite.ToString());
Response.End();
|
|
|
|
|
I am trying to set up Database to use ASP.Net Memebership as below. There would be two DB one is SBCentral and SB.
SBCentral will be used for memebership purpose/and all app meta data where SB database will be used for all other application activites. I already compiled and created a new db as "SBCentral" by using aspnet_regsql. Now when i am trying to test this through web admin tool (website-->Asp.net configuration) i am getting error as
Provider Management
Could not establish a connection to the database.
If you have not yet created the SQL Server database, exit the Web Site Administration tool, use the aspnet_regsql command-line utility to create and configure the database, and then return to this tool to set the provider
<connectionStrings>
<remove name="LocalSqlServer"/>
<add name="SB"
connectionString="Data Source=81080EA37F\SQLEXPRESS;Initial Catalog=SB;User ID=sa;Password=abc" providerName="System.oledb.SqlClient" />
<add name="SBCentral"
connectionString="Data Source=81080EA37F\SQLEXPRESS;Initial Catalog=SBCentral;User ID=sa;Password=abc" providerName="System.oledb.SqlClient" />
</connectionStrings>
<system.web>
<membership>
<providers>
<add connectionStringName="SBCentral" name="CustomProvider"
type="System.Web.Security.SqlMembershipProvider" />
</providers>
</membership>
Any help?
Amit
|
|
|
|
|
I chnaged the custom provider name to AspNetSqlMembershipProvider from name CustomPrvoider and now it is not throwing error.
But a new problem, evertime when i try to create user, it creates in ASPNETDB.MDF file instead of SBCentral...
I also changed my CentralDb to ASPNetDB.....But no luck....
So please guys help me....
|
|
|
|
|
I am planning to use the new feature of ASP.Net 2.0 in my one of new website and i am doing analysis to see capablities of these new features.
I have a quick query and it would be nice if you can show me some direction.
I am planning to implement memebership API for creating user, validating user, etc... but i don't want to use SQL Express Database (whiich comes with ASP.net) because of security reason. I am planning to use SQL 2005. So what i need to do....Do i need to create same tables in my SQL 2005 database (same name, same columns etc...) or i can have custom tables.
Amit
|
|
|
|
|
I need to combine columns from 3 different tables (ofcourse from a single database)in to a single DataSet...and also I need to add a Column along with the same Dataset ...So,kindly tell me how to do this..??
And also i am planning to create a crystal report for this newly created DataSet.
I need ur suggestions and help.
Kindly help me ...Pls!!
My project deadline is 27th July..With in that i need to generate 6 different reports with 6 different logics..So,kindly help this poor fresher...!!
Happy Programming!!!
|
|
|
|