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. button click without submiting the page

button click without submiting the page

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

    i need to fire the click event for a button but without submiting the page... someone help me please.... hi i am ezak neno

    M 1 Reply Last reply
    0
    • E ezak

      i need to fire the click event for a button but without submiting the page... someone help me please.... hi i am ezak neno

      M Offline
      M Offline
      mr_Tarang
      wrote on last edited by
      #2

      Hi ezak... If you are using Web Controls Button then it is always run at server (Mean go to server) dont confuse... It depands on your requirement please define what operation u want after button click... then we decide how u can manage it. Tarang j vyas

      E 1 Reply Last reply
      0
      • M mr_Tarang

        Hi ezak... If you are using Web Controls Button then it is always run at server (Mean go to server) dont confuse... It depands on your requirement please define what operation u want after button click... then we decide how u can manage it. Tarang j vyas

        E Offline
        E Offline
        ezak
        wrote on last edited by
        #3

        i use c# language for webApp...and what i want to do is.....a chess game... i did it at the windows forms...i handled all the defualt actions for all the unites....by obtaining the x,y in the form_click....when i begin in the webform...i didn't found the form_click...so i decided to make all the unites such a buttons...(and changing the border style)..to make it flate..... i know it a long story...but what i want to do is...when u click the button (that has a unit image)...to not submit the page...and do anther action.... plaese help me man......

        R 1 Reply Last reply
        0
        • E ezak

          i use c# language for webApp...and what i want to do is.....a chess game... i did it at the windows forms...i handled all the defualt actions for all the unites....by obtaining the x,y in the form_click....when i begin in the webform...i didn't found the form_click...so i decided to make all the unites such a buttons...(and changing the border style)..to make it flate..... i know it a long story...but what i want to do is...when u click the button (that has a unit image)...to not submit the page...and do anther action.... plaese help me man......

          R Offline
          R Offline
          Rob Koval
          wrote on last edited by
          #4

          Be aware that button has two types of ocnlick events. Server side (the one that submits the page) and client side (the one you want) what you can do is to hav eboth attached to a button. However this cannot be done in design time. In page_load event you can do something like this to attach client side onclick handlers to your buttons: myBtn.attributes.Add("onclick","myJavaScriptFunction()"); another option is not to use server side buttons (not to user runat="server" attributes) r.

          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