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. client side script for server control

client side script for server control

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

    need to have a popup window asking user for yes and no when he selects delete if he says yes i go ahead and delete otherwise i return back to screen and   do other things. Can I write a javascript method and call it in onclick of my delete button? will it work? not sure as delete linkbutton runat="server".

    D N D 3 Replies Last reply
    0
    • D dotnetcsharpdev

      need to have a popup window asking user for yes and no when he selects delete if he says yes i go ahead and delete otherwise i return back to screen and   do other things. Can I write a javascript method and call it in onclick of my delete button? will it work? not sure as delete linkbutton runat="server".

      D Offline
      D Offline
      DeveloperAtul
      wrote on last edited by
      #2

      Sure you can use Javascript, By geting the button click event on popup, You can handle that event by passing the values...

      1 Reply Last reply
      0
      • D dotnetcsharpdev

        need to have a popup window asking user for yes and no when he selects delete if he says yes i go ahead and delete otherwise i return back to screen and   do other things. Can I write a javascript method and call it in onclick of my delete button? will it work? not sure as delete linkbutton runat="server".

        N Offline
        N Offline
        Not Active
        wrote on last edited by
        #3

        Use the confirm [^]method.


        only two letters away from being an asset

        1 Reply Last reply
        0
        • D dotnetcsharpdev

          need to have a popup window asking user for yes and no when he selects delete if he says yes i go ahead and delete otherwise i return back to screen and   do other things. Can I write a javascript method and call it in onclick of my delete button? will it work? not sure as delete linkbutton runat="server".

          D Offline
          D Offline
          dotnetcsharpdev
          wrote on last edited by
          #4

          thanx all. I tried it but getting an error can anyone help <pre> <asp:TemplateField ShowHeader="False">                         <itemtemplate>                               <asp:LinkButton id="linkBtnSurrender" runat="server" Text="Surrender" CommandName="Surrender" CommandArgument='<%#Eval("SOVehicle.SOVehicleId") %>'   onclick="confirmation()" value = "Surrender"></asp:LinkButton>                         </itemtemplate>                   </asp:TemplateField> </pre> getting this error :doh: CS0117: 'ASP.usercontrols_sovehiclepodcontrol_ascx' does not contain a definition for 'confirmation'

          D 1 Reply Last reply
          0
          • D dotnetcsharpdev

            thanx all. I tried it but getting an error can anyone help <pre> <asp:TemplateField ShowHeader="False">                         <itemtemplate>                               <asp:LinkButton id="linkBtnSurrender" runat="server" Text="Surrender" CommandName="Surrender" CommandArgument='<%#Eval("SOVehicle.SOVehicleId") %>'   onclick="confirmation()" value = "Surrender"></asp:LinkButton>                         </itemtemplate>                   </asp:TemplateField> </pre> getting this error :doh: CS0117: 'ASP.usercontrols_sovehiclepodcontrol_ascx' does not contain a definition for 'confirmation'

            D Offline
            D Offline
            DoctorMick
            wrote on last edited by
            #5

            Change onclick to onclientclick.

            D 1 Reply Last reply
            0
            • D DoctorMick

              Change onclick to onclientclick.

              D Offline
              D Offline
              dotnetcsharpdev
              wrote on last edited by
              #6

              Thanx v much.. it worked.. :-D

              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