Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. MessageBox in Web Forms

MessageBox in Web Forms

Scheduled Pinned Locked Moved C#
asp-netwinformsquestion
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • I Offline
    I Offline
    Imran Adam
    wrote on last edited by
    #1

    Hi I would like to know how would i display a messageBox in a web form. I know in Windows forms you would use something like MessageBox.Show("Hello"); How could i show this kind of dialog box (or equivalent)on a web form, if a user clicks a button??

    Cheers :)

    A 1 Reply Last reply
    0
    • I Imran Adam

      Hi I would like to know how would i display a messageBox in a web form. I know in Windows forms you would use something like MessageBox.Show("Hello"); How could i show this kind of dialog box (or equivalent)on a web form, if a user clicks a button??

      Cheers :)

      A Offline
      A Offline
      Abhijit Jana
      wrote on last edited by
      #2

      if you want to use message box in your web page use Jvascript for that !!!

        void MessagBox(string s)
            {
                alert(s);
             }
      

      and on button Click call that function!!!

      Best Regards ----------------- Abhijit Jana View My CodeProject Articles "Success is Journey it's not a destination"

      I 1 Reply Last reply
      0
      • A Abhijit Jana

        if you want to use message box in your web page use Jvascript for that !!!

          void MessagBox(string s)
              {
                  alert(s);
               }
        

        and on button Click call that function!!!

        Best Regards ----------------- Abhijit Jana View My CodeProject Articles "Success is Journey it's not a destination"

        I Offline
        I Offline
        Imran Adam
        wrote on last edited by
        #3

        Thanks for that:) now i'd just like to know, if i had a hyperlink on my page and when the user clicked on that link a messageBox should appear. How could i acheive this?? similar procedure using client side scripts??

        Cheers :)

        A 1 Reply Last reply
        0
        • I Imran Adam

          Thanks for that:) now i'd just like to know, if i had a hyperlink on my page and when the user clicked on that link a messageBox should appear. How could i acheive this?? similar procedure using client side scripts??

          Cheers :)

          A Offline
          A Offline
          Abhijit Jana
          wrote on last edited by
          #4

          Yes, You can use on link button and call that method onclick of that link !!!

          Best Regards ----------------- Abhijit Jana View My CodeProject Articles "Success is Journey it's not a destination"

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups