Results 1 to 3 of 3

Thread: Message box in ASP.NET

  1. #1

    Thread Starter
    Member
    Join Date
    Jan 2020
    Posts
    59

    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?

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    110,297

    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/

  3. #3
    New Member
    Join Date
    Jul 2020
    Posts
    9

    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
  •  



Click Here to Expand Forum to Full Width