-
May 28th, 2020, 12:04 AM
#1
Thread Starter
Member
Message box in ASP.NET
Hello guys
Please help me
In Windows Form, I used this message box but i need to convert this message box to web asp.net , message as below :
MessageBox.Show(null, "The error Is" + ex.Message, MessageBoxButtons.OK, MessageBoxIcon.Information);
MessageBox.Show(result);
How can i do that?
-
May 28th, 2020, 12:30 AM
#2
Re: Message box in ASP.NET
There's no real direct conversion. In a web app, your VB code is executed on the server while the UI is displayed in a browser, possibly on the other side of the world. If you want to display a popup message to the user then you need to do so using JavaScript. In the most simple case, you can use the alert function. If you want something a bit more sophisticated then you can use something like the Dialog from jQuery UI:
https://jqueryui.com/dialog/
Last edited by jmcilhinney; May 28th, 2020 at 12:51 AM.
-
Aug 19th, 2020, 09:56 AM
#3
New Member
Re: Message box in ASP.NET
MessageBox.Show can only work when you have not deploy the app. Once deployed, everything run at server.
The alternative is to script manager.
ScriptManager.RegisterStartupScript(Page,Page.GetType(),"yourkek","alert('Hello');", True)
That's
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|