|
After i click a button to show message box ==> MessageBoc.Show("Error");
Bellow message displayed.......
It is invalid to show a modal dialog or form when the application is not running in UserInteractive mode. Specify the ServiceNotification or DefaultDesktopOnly style to display a notification from a service application.
How to solve this problem?
|
|
|
|
|
MessageBox.Show("Error");
this will not work in Asp.NET bcoz run time message box can be generated using only scripting languages.
like Javascript.
multimedia9
|
|
|
|
|
hi,
i use asp.net with c# to write the code.....it need to prompt a messagebox ...so, how to write the code to display it?
thanks......
|
|
|
|
|
Hi
You can use it with Javascript
In Javascript there is an 'alert()' Function .
you can use it
thanks
Raghvendra Kumar Roy
|
|
|
|
|
Hi,
Actually , i dun know about JAVA language.....Can mix with asp.net? U know how to solve it?
Thanks,
Eva
|
|
|
|
|
hi wongeva
it's so simple to writing the Javascript in your asp.net application
just follow the steps
-- Open your html source view(behind the designer form)
-- write down the code in after the
<title>
--
function ClickMe()
{
Alert("The Messabox Appears");
return false;
}
-- and call this function on your "OnClick" event of button
--Like <input type="submit" id="btnDemo" OnClick="return ClickMe();" runat="server">
Hope this will help U...Best luck
-regards,
koolprasad2003
<div class="ForumSig">If the message is useful for U then please Rate This message...
Be a good listener...Because Opprtunity knoughts softly...N-Joy</div>
|
|
|
|
|
<%@ Page language="c#" Codebehind="WebForm2.aspx.cs" AutoEventWireup="false" Inherits="try2.WebForm2" %>
<title>WebForm2
function ClickMe()
{
Alert("The MessageBox Appears");
return false;
}
|
|
|
|
|
Javascript is case sensetive. Change Alert to alert .
---
single minded; short sighted; long gone;
|
|
|
|
|
friend,
Guffa is correct....change the "Alert" to "alert" this will definately help you...
(By mistake i was write "Alert")
regards,
koolprasad2003
If the answer is useful for U then please Rate This message...
Be a good listener...Because Opprtunity knoughts softly...N-Joy
|
|
|
|
|
I hav written code using cookies
how to expire that cookie at the moment
please send me reply i will be helpful to you. confused:
multimedia9
|
|
|
|
|
multimedia9 wrote: how to expire that cookie at the moment
When user is logging out ? Or after some interval ?
|
|
|
|
|
Hi frnd,
thank u
but i want coding behind that signout
i will be happy if u reply to this
multimedia9
|
|
|
|
|
The best way the cookie to delete is expire it
Use this code.
cookie.Expires = DataTime.now.AddDay(Number of Day);
This will expire your cookie.
Here Number of Day is the Negative value this you priviously given To your cookie when you create..
Hope this will help you.
|
|
|
|
|
Hi frnd,
Thank you very very much, once again thanks.
i hav one more problem, i visited ur site thats nice. please help me by answering the next question in the forum.
multimedia9
|
|
|
|
|
Hi friend sorry but i didnt fine your question..
if you have problem then you can send it againg or mail me by to my email
|
|
|
|
|
static string conn="provider=microsoft.jet.oledb.4.0;data Source="+ Server.MapPath("/data/db1.mdb");
OleDbConnection cn=new OleDbConnection(conn);
please help me, where did i make wrong in the above instructions and please solve this.
it show error that:'System.Web.UI.Page.Server' denotes a 'property' where a 'class' was expected
www.mywebsite.com/data/db1.mdb
how to access the db1.mdb file using Asp.NET using c# please help me i will be thank full to you.
please answer me with above example
multimedia9
|
|
|
|
|
HI,
R u getting runtime error or compiletime error?
Thanks and Regards,
Chetan Ranpariya
|
|
|
|
|
hi
Iam getting compile time error
|
|
|
|
|
Hi friend sorry but i never got this type of error while connection string
you r doing right.
I just thinking where you done this coding is it in the class or out of class method??
May be that's only problem..
Sorry for this..
|
|
|
|
|
static string conn="provider=microsoft.jet.oledb.4.0;data Source="+ Server.MapPath("/data/db1.mdb");
OleDbConnection cn=new OleDbConnection(conn);
please help me, where did i make wrong in the above instructions and please solve this.
it show error that:'System.Web.UI.Page.Server' denotes a 'property' where a 'class' was expected
www.mywebsite.com/data/db1.mdb
how to access the db1.mdb file using Asp.NET using c# please help me i will be thank full to you.
please answer me with above example
multimedia9
|
|
|
|
|
|
Hi frnd
Thank u
They hav given the general connection strings,
these are used to connect to local host, but i need to connect to webserver.
if you reply with appr answer i will be very happy, & please try to know the answer by asking ur colleagues.
i will be thank ful to you if you consider this request.
multimedia9
|
|
|
|
|
Hi
1. After deploying your web application in server and link will be like: http://10.57.89.15/TestWebApplication/page.aspx
2. The Virtual directory (i.e 'TestWebApplication' as in the above code) you created in server can be modified using Web.Config. Add a key and value to store virtual directory name. Use this key in your code-behind file. ConfigurationSettings.AppSettings
3. If your .mdb file is in sub-folder of your web app i.e., in App_Data. Then that file can be accessed using the foll. code
<br />
string StrDataSource = Server.MapPath("\\TestWebApplication\\App_Data\\db1.mdb");<br />
Hope you got it.
Harini
|
|
|
|
|
hi
thank u
string StrDataSource = Server.MapPath("\\TestWebApplication\\App_Data\\db1.mdb");
this instruction gives an error that " 'System.Web.UI.Page.Server' denotes a 'property' where a 'class' was expected ".
Please solve this problem.
thank u
|
|
|
|
|
Hi
It was working fine for me when I give Server.MapPath.
Try change Server.MapPath to HttpContext.Current.Server.MapPath
Harini
|
|
|
|