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. Web Development
  3. ASP.NET
  4. How to show Message Box in Asp.Net with C#

How to show Message Box in Asp.Net with C#

Scheduled Pinned Locked Moved ASP.NET
csharpasp-nettutorial
6 Posts 5 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.
  • P Offline
    P Offline
    princy10
    wrote on last edited by
    #1

    Hi, I just want to know how to show a message box in c# in vb.net i was using like this; MessageBox.Show("Data Saved ...", "Test", MessageBoxButtons.OK, MessageBoxIcon.Warning) for to get such a message what i have to use in asp.net with C# Thanks&Regards Princy

    M J V 3 Replies Last reply
    0
    • P princy10

      Hi, I just want to know how to show a message box in c# in vb.net i was using like this; MessageBox.Show("Data Saved ...", "Test", MessageBoxButtons.OK, MessageBoxIcon.Warning) for to get such a message what i have to use in asp.net with C# Thanks&Regards Princy

      M Offline
      M Offline
      Murugesan G
      wrote on last edited by
      #2

      ASP.Net is a server side code and u wanted to show any message to end user on web based application then u go with javascript alert method or try to have new web page just for showing messages alone.

      1 Reply Last reply
      0
      • P princy10

        Hi, I just want to know how to show a message box in c# in vb.net i was using like this; MessageBox.Show("Data Saved ...", "Test", MessageBoxButtons.OK, MessageBoxIcon.Warning) for to get such a message what i have to use in asp.net with C# Thanks&Regards Princy

        J Offline
        J Offline
        jai_101
        wrote on last edited by
        #3

        Hi, You can use any one of the Following Syntax in Code Behind. string Msg = "Hai"; string jv = "alert('" + (Msg) + "');"; ScriptManager.RegisterClientScriptBlock(this, typeof(Page), "alert", jv, false); (or) Page.RegisterStartupScript("Error", "alert('Hai')"); bye :rose:

        1 Reply Last reply
        0
        • P princy10

          Hi, I just want to know how to show a message box in c# in vb.net i was using like this; MessageBox.Show("Data Saved ...", "Test", MessageBoxButtons.OK, MessageBoxIcon.Warning) for to get such a message what i have to use in asp.net with C# Thanks&Regards Princy

          V Offline
          V Offline
          Vimalsoft Pty Ltd
          wrote on last edited by
          #4

          See this http://vuyiswamaseko.blogspot.com/2009/04/how-to-show-mesage-box-in-aspnet.html[^] Hope it Helps :)

          Vuyiswa Maseko, Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers." C#/VB.NET/ASP.NET/SQL7/2000/2005/2008 http://www.vuyiswamaseko.tiyaneProperties.co.za vuyiswa@its.co.za http://www.itsabacus.co.za/itsabacus/

          A 1 Reply Last reply
          0
          • V Vimalsoft Pty Ltd

            See this http://vuyiswamaseko.blogspot.com/2009/04/how-to-show-mesage-box-in-aspnet.html[^] Hope it Helps :)

            Vuyiswa Maseko, Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers." C#/VB.NET/ASP.NET/SQL7/2000/2005/2008 http://www.vuyiswamaseko.tiyaneProperties.co.za vuyiswa@its.co.za http://www.itsabacus.co.za/itsabacus/

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

            Vuyiswa, I saw your post. its cool. Will it work if we have ScriptManager in that page? In that case you have to use ScriptManager insted of ClientScript. You may add this section also on that post. Thanks !

            cheers, Abhijit CodeProject MVP

            V 1 Reply Last reply
            0
            • A Abhijit Jana

              Vuyiswa, I saw your post. its cool. Will it work if we have ScriptManager in that page? In that case you have to use ScriptManager insted of ClientScript. You may add this section also on that post. Thanks !

              cheers, Abhijit CodeProject MVP

              V Offline
              V Offline
              Vimalsoft Pty Ltd
              wrote on last edited by
              #6

              Yes it will work. Will add it Thanks !

              Vuyiswa Maseko, Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers." C#/VB.NET/ASP.NET/SQL7/2000/2005/2008 http://www.vuyiswamaseko.tiyaneProperties.co.za vuyiswa@its.co.za http://www.itsabacus.co.za/itsabacus/

              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