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. msgbox

msgbox

Scheduled Pinned Locked Moved ASP.NET
csharpquestionasp-net
6 Posts 4 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.
  • C Offline
    C Offline
    chohanpk
    wrote on last edited by
    #1

    if(SqlDataReader read.Read()) { if (read["rooms"].Equals("tv lounge")) { ??how can i display a msgbox here if this condition is true in asp.net with C#???? }

    Chohan

    _ G 2 Replies Last reply
    0
    • C chohanpk

      if(SqlDataReader read.Read()) { if (read["rooms"].Equals("tv lounge")) { ??how can i display a msgbox here if this condition is true in asp.net with C#???? }

      Chohan

      _ Offline
      _ Offline
      _AK_
      wrote on last edited by
      #2

      you can use javascript alert to show the message to the user. Something like this: Response.Write("alert('hi kaushal');");

      Best Regards, Apurva Kaushal

      1 Reply Last reply
      0
      • C chohanpk

        if(SqlDataReader read.Read()) { if (read["rooms"].Equals("tv lounge")) { ??how can i display a msgbox here if this condition is true in asp.net with C#???? }

        Chohan

        G Offline
        G Offline
        GaryWoodfine
        wrote on last edited by
        #3

        You can't show a message box directly from C# in ASP.net You have to use a javascript Alert

        Kind Regards, Gary


        My Website || My Blog || My Articles

        N 1 Reply Last reply
        0
        • G GaryWoodfine

          You can't show a message box directly from C# in ASP.net You have to use a javascript Alert

          Kind Regards, Gary


          My Website || My Blog || My Articles

          N Offline
          N Offline
          Nisha_D
          wrote on last edited by
          #4

          [Message Deleted]

          G C 2 Replies Last reply
          0
          • N Nisha_D

            [Message Deleted]

            G Offline
            G Offline
            GaryWoodfine
            wrote on last edited by
            #5

            No this is wrong. This will display a message box on the server and will not be visible by them client. Javascript is the way to go

            Kind Regards, Gary


            My Website || My Blog || My Articles

            1 Reply Last reply
            0
            • N Nisha_D

              [Message Deleted]

              C Offline
              C Offline
              chohanpk
              wrote on last edited by
              #6

              System.windows.forms.messagebox.show("Hai") cant disply a msgbox through this command.Also it generate error in my error because no namespace available for "windows" in asp.net

              Chohan

              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