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 use message box in asp.net

How to use message box in asp.net

Scheduled Pinned Locked Moved ASP.NET
csharpasp-nethelptutorial
7 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.
  • D Offline
    D Offline
    Deepak Nigam
    wrote on last edited by
    #1

    Hello friends, I want to give a message to the user in a alert format that your data has been saved successfully after saving data. But i am unable to do this........ Please help me i am also using ajax updatepanel...... Thanks in advance........

    Deepak Nigam

    C A W 3 Replies Last reply
    0
    • D Deepak Nigam

      Hello friends, I want to give a message to the user in a alert format that your data has been saved successfully after saving data. But i am unable to do this........ Please help me i am also using ajax updatepanel...... Thanks in advance........

      Deepak Nigam

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      Tis is a web app, so message boxes need to me javascript, namely the alert command. You can emit script using the RegisterClientScriptBlock metod from you code behind, or write client side code to show it in response to AJAX calls

      Christian Graus Please read this if you don't understand the answer I've given you "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

      D 1 Reply Last reply
      0
      • C Christian Graus

        Tis is a web app, so message boxes need to me javascript, namely the alert command. You can emit script using the RegisterClientScriptBlock metod from you code behind, or write client side code to show it in response to AJAX calls

        Christian Graus Please read this if you don't understand the answer I've given you "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

        D Offline
        D Offline
        Deepak Nigam
        wrote on last edited by
        #3

        Hello Christian, I am getting the following error "The Message recived from the server could not be parsed. Common causes for this error are the response is modifiyed ba calls to response.write(), response details , HttpModule, OR server trace is enabled. As i am using the this inside a updatepanel. I got this solution but confused that how to use this ScriptManager.RegisterStartupScript(Me, Me.GetType, "key", "open('" + filename + "');", True) I have a MessageBox Class that is working well with the simple forms......

        Deepak Nigam

        C B 2 Replies Last reply
        0
        • D Deepak Nigam

          Hello Christian, I am getting the following error "The Message recived from the server could not be parsed. Common causes for this error are the response is modifiyed ba calls to response.write(), response details , HttpModule, OR server trace is enabled. As i am using the this inside a updatepanel. I got this solution but confused that how to use this ScriptManager.RegisterStartupScript(Me, Me.GetType, "key", "open('" + filename + "');", True) I have a MessageBox Class that is working well with the simple forms......

          Deepak Nigam

          C Offline
          C Offline
          Christian Graus
          wrote on last edited by
          #4

          OK, perhaps you need to write client side script to handle this, if you are using the ASP.NET AJAX library as well, I don't know, I don't really use it.

          Christian Graus Please read this if you don't understand the answer I've given you "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

          1 Reply Last reply
          0
          • D Deepak Nigam

            Hello friends, I want to give a message to the user in a alert format that your data has been saved successfully after saving data. But i am unable to do this........ Please help me i am also using ajax updatepanel...... Thanks in advance........

            Deepak Nigam

            A Offline
            A Offline
            ArunVijay
            wrote on last edited by
            #5

            Hello Deepak .. I'm Arun Vijay . I hope Below Code will Help You. :) Write Below In HTML source. function confirm() { else return false; } Ans This One in CodeBehind '.cs' ButtonName.Attributes.Add("onclick","return confirm('ENTER YOUR MSG')");

            ArunVijay

            1 Reply Last reply
            0
            • D Deepak Nigam

              Hello Christian, I am getting the following error "The Message recived from the server could not be parsed. Common causes for this error are the response is modifiyed ba calls to response.write(), response details , HttpModule, OR server trace is enabled. As i am using the this inside a updatepanel. I got this solution but confused that how to use this ScriptManager.RegisterStartupScript(Me, Me.GetType, "key", "open('" + filename + "');", True) I have a MessageBox Class that is working well with the simple forms......

              Deepak Nigam

              B Offline
              B Offline
              Broken Bokken
              wrote on last edited by
              #6

              Do you have trace on? Ajax controls do not work with trace enabled. It's a bug I have experienced myself.

              Broken Bokken http://www.brokenbokken.com

              1 Reply Last reply
              0
              • D Deepak Nigam

                Hello friends, I want to give a message to the user in a alert format that your data has been saved successfully after saving data. But i am unable to do this........ Please help me i am also using ajax updatepanel...... Thanks in advance........

                Deepak Nigam

                W Offline
                W Offline
                www Developerof NET
                wrote on last edited by
                #7

                All you need to do is call this function afer u save ur data.. eg.. SaveData() { your insert code here.... ..... Show_Msg(); } Sub Show_Msg() Dim scp As String = "alert('Data Saved Successfully ');" ClientScript.RegisterClientScriptBlock(Me.GetType(), "script1", scp) End Sub

                When you fail to plan, you are planning to fail.

                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