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. ok and cancel button in asp.net with vb.net 1.1

ok and cancel button in asp.net with vb.net 1.1

Scheduled Pinned Locked Moved ASP.NET
toolshelpcsharpjava
4 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.
  • A Offline
    A Offline
    amaneet
    wrote on last edited by
    #1

    Sir, I am deleting the record in the datagrid but before deleting the row i want to send the request like 'are u sure u want to delete the record' .I mean i want two buttons Ok and cancel if ok is pressed it deletes the row otherwise row will not be deleted and for that i don't want to use another web form and want java script tools .Can i use these things in vb code behind file . If possible please send some code. Please help how to solve this problem. Thanks

    A M M 3 Replies Last reply
    0
    • A amaneet

      Sir, I am deleting the record in the datagrid but before deleting the row i want to send the request like 'are u sure u want to delete the record' .I mean i want two buttons Ok and cancel if ok is pressed it deletes the row otherwise row will not be deleted and for that i don't want to use another web form and want java script tools .Can i use these things in vb code behind file . If possible please send some code. Please help how to solve this problem. Thanks

      A Offline
      A Offline
      Amit Agarrwal
      wrote on last edited by
      #2

      use javasciript code for confirmation.

      1 Reply Last reply
      0
      • A amaneet

        Sir, I am deleting the record in the datagrid but before deleting the row i want to send the request like 'are u sure u want to delete the record' .I mean i want two buttons Ok and cancel if ok is pressed it deletes the row otherwise row will not be deleted and for that i don't want to use another web form and want java script tools .Can i use these things in vb code behind file . If possible please send some code. Please help how to solve this problem. Thanks

        M Offline
        M Offline
        mcgann
        wrote on last edited by
        #3

        Try adding this after the tag function confirmDelete(e) { var targ; if (!e) var e = window.event; targ = (e.target) ? e.target : e.srcElement; if (targ.nodeType == 3) targ = targ.parentNode; if (targ.id.toLowerCase().indexOf("delete") >= 0) { return confirm("Are you sure you want to delete?"); } } document.onclick = confirmDelete; <\script> Please note the button you click to delete the item from the datagrid must be called delete as this function will check to see if the button you clicked has text value set to 'delete' </x-turndown>

        1 Reply Last reply
        0
        • A amaneet

          Sir, I am deleting the record in the datagrid but before deleting the row i want to send the request like 'are u sure u want to delete the record' .I mean i want two buttons Ok and cancel if ok is pressed it deletes the row otherwise row will not be deleted and for that i don't want to use another web form and want java script tools .Can i use these things in vb code behind file . If possible please send some code. Please help how to solve this problem. Thanks

          M Offline
          M Offline
          minhpc_bk
          wrote on last edited by
          #4

          Yet other examples from the site[^].

          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