Results 1 to 3 of 3

Thread: Message box in ASP.NET

  1. #1

    Thread Starter
    Join Date
    Jan 2020

    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 , message as below :

    MessageBox.Show(null, "The error Is" + ex.Message, MessageBoxButtons.OK, MessageBoxIcon.Information);

    How can i do that?

  2. #2
    .NUT jmcilhinney's Avatar
    Join Date
    May 2005
    Sydney, Australia

    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:

  3. #3
    New Member
    Join Date
    Jul 2020

    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)

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