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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Web Development
  3. ASP.NET
  4. Message box response

Message box response

Scheduled Pinned Locked Moved ASP.NET
questiondesignsysadmintutorial
7 Posts 3 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.
  • G Offline
    G Offline
    Girish481
    wrote on last edited by
    #1

    In the Default.aspx.vb is have following coding:

    Protected Sub GridView1_RowDeleting(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GridView1.RowDeleting
    MessageBox.Show("Do You want to Delete the Row..?", "Row Deleting", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2, MessageBoxOptions.DefaultDesktopOnly, False)
    If vbNo = MsgBoxResult.No Then
    e.Cancel = True
    End If
    End Sub

    But the response of message box is not coming on client machine, it is sending the response to server machine. How to get the respose on the client machine not at server machine. Thanks & Regards Girish Sharma

    L 1 Reply Last reply
    0
    • G Girish481

      In the Default.aspx.vb is have following coding:

      Protected Sub GridView1_RowDeleting(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GridView1.RowDeleting
      MessageBox.Show("Do You want to Delete the Row..?", "Row Deleting", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2, MessageBoxOptions.DefaultDesktopOnly, False)
      If vbNo = MsgBoxResult.No Then
      e.Cancel = True
      End If
      End Sub

      But the response of message box is not coming on client machine, it is sending the response to server machine. How to get the respose on the client machine not at server machine. Thanks & Regards Girish Sharma

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      Girish481 wrote:

      MessageBox.Show("Do You want to Delete the Row..?", "Row Deleting", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2, MessageBoxOptions.DefaultDesktopOnly, False)

      How can you use MessageBox.Show in ASP.NET, it belong to windows App. Try using confirm of JavaScript

      G 1 Reply Last reply
      0
      • L Lost User

        Girish481 wrote:

        MessageBox.Show("Do You want to Delete the Row..?", "Row Deleting", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2, MessageBoxOptions.DefaultDesktopOnly, False)

        How can you use MessageBox.Show in ASP.NET, it belong to windows App. Try using confirm of JavaScript

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

        But it is working fine; the only thing is that it is sending response to server machine. Ok, please tell me how to code confirm of javascript in this case when a user is clicking on delete link of GridView1 control. Thanks and Regards Girish Sharma

        A 1 Reply Last reply
        0
        • G Girish481

          But it is working fine; the only thing is that it is sending response to server machine. Ok, please tell me how to code confirm of javascript in this case when a user is clicking on delete link of GridView1 control. Thanks and Regards Girish Sharma

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

          Girish481 wrote:

          But it is working fine;

          You are running your application from VS IDE. Try to host on IIS, access from browser and from different system As amandeep already suggested, you have to use JavaScript Confirm Box.

          cheers, Abhijit CodeProject MVP

          G 1 Reply Last reply
          0
          • A Abhijit Jana

            Girish481 wrote:

            But it is working fine;

            You are running your application from VS IDE. Try to host on IIS, access from browser and from different system As amandeep already suggested, you have to use JavaScript Confirm Box.

            cheers, Abhijit CodeProject MVP

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

            Thanks Abhijit for your response. Actually before this i was running my web application on server itself; but yesterday when i run from another machine; i got that messagebox's response was not at client side; it was as server machine, so i supposed that there should be extra code for messagebox or javascript confirm box. So please tell me, where and what should i code to get confirm box when user click on delete link of GridView1 control. Regards Girish Sharma

            A 1 Reply Last reply
            0
            • G Girish481

              Thanks Abhijit for your response. Actually before this i was running my web application on server itself; but yesterday when i run from another machine; i got that messagebox's response was not at client side; it was as server machine, so i supposed that there should be extra code for messagebox or javascript confirm box. So please tell me, where and what should i code to get confirm box when user click on delete link of GridView1 control. Regards Girish Sharma

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

              Try to use This[^]

              cheers, Abhijit CodeProject MVP

              G 1 Reply Last reply
              0
              • A Abhijit Jana

                Try to use This[^]

                cheers, Abhijit CodeProject MVP

                G Offline
                G Offline
                Girish481
                wrote on last edited by
                #7

                Thank you Abhijit for your link. I learnt from the link and finally got the result as below from TemplateField. <asp:TemplateField ShowHeader="False"> <ItemTemplate> <asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="False" CommandName="Delete" OnClientClick="return window.confirm('Are you sure ?')" Text="Delete"></asp:LinkButton> </ItemTemplate> </asp:TemplateField> Regards Girish Sharma

                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