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. Why Event is not firing for an ASP.NET Button??

Why Event is not firing for an ASP.NET Button??

Scheduled Pinned Locked Moved ASP.NET
csharpasp-nethelpquestion
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.
  • S Offline
    S Offline
    SIJUTHOMASP
    wrote on last edited by
    #1

    Hi, I am having an ASP.NET button inside a panel.But when I click on this it is not firing the event.."Click" and it is not giving to the page_init,page _load event on posting back..I tried with a new button added..It is still giving the same problem.. Any Idea will be much appreciated why this is happenening.. Pls show me the right way to resolve this.. Thank You, RPM

    J N 2 Replies Last reply
    0
    • S SIJUTHOMASP

      Hi, I am having an ASP.NET button inside a panel.But when I click on this it is not firing the event.."Click" and it is not giving to the page_init,page _load event on posting back..I tried with a new button added..It is still giving the same problem.. Any Idea will be much appreciated why this is happenening.. Pls show me the right way to resolve this.. Thank You, RPM

      J Offline
      J Offline
      jszpila
      wrote on last edited by
      #2

      I've found sometimes for whatever reason, Visual Studio sometimes disassociates button events. Usually all it takes for me to fix is to put in a Response.Write("button clicked") in the event handler. That usually gets things going, then you can just erase or comment out that line. It's some kind of wacky VS voodoo. ------------------- abort, retry, fail?

      S 1 Reply Last reply
      0
      • J jszpila

        I've found sometimes for whatever reason, Visual Studio sometimes disassociates button events. Usually all it takes for me to fix is to put in a Response.Write("button clicked") in the event handler. That usually gets things going, then you can just erase or comment out that line. It's some kind of wacky VS voodoo. ------------------- abort, retry, fail?

        S Offline
        S Offline
        SIJUTHOMASP
        wrote on last edited by
        #3

        Hi Jszpila, Thanks much for the information.... I tried by putting the code Response.write("button clicked") inside the button click event..But still I cannot get the event fired........... Thank you, RPM.:((:((:((:((:((:((

        E 1 Reply Last reply
        0
        • S SIJUTHOMASP

          Hi Jszpila, Thanks much for the information.... I tried by putting the code Response.write("button clicked") inside the button click event..But still I cannot get the event fired........... Thank you, RPM.:((:((:((:((:((:((

          E Offline
          E Offline
          eggsovereasy
          wrote on last edited by
          #4

          If you are using VS2005 make sure the OnClick property is set in the markup for the asp:button, if you are using VS2003 make sure the event handler is being properly added in the generated code area.

          S 1 Reply Last reply
          0
          • E eggsovereasy

            If you are using VS2005 make sure the OnClick property is set in the markup for the asp:button, if you are using VS2003 make sure the event handler is being properly added in the generated code area.

            S Offline
            S Offline
            SIJUTHOMASP
            wrote on last edited by
            #5

            Hi eggsovereasy, I am using vs 2003..and event handler is added like "Protected WithEvents BtnUpdate As System.Web.UI.WebControls.Button" and in the button click it handles BtnUpdate.Click... When I click it is not going to the Page_Init or Page_load event also.. Pls help... Thank You, RPM.:confused:

            M 1 Reply Last reply
            0
            • S SIJUTHOMASP

              Hi eggsovereasy, I am using vs 2003..and event handler is added like "Protected WithEvents BtnUpdate As System.Web.UI.WebControls.Button" and in the button click it handles BtnUpdate.Click... When I click it is not going to the Page_Init or Page_load event also.. Pls help... Thank You, RPM.:confused:

              M Offline
              M Offline
              mayurmanu hotmail com
              wrote on last edited by
              #6

              I used vs 2003 even i faced same problem, but i sort out the problem by deleting the onclick button event and again redo btnclick event becoz sometimes the click event is not fired( for ex in vs 2003 when u rename the button on click event it takes oldername ratherthen new button name but i remove the code declared for oldbuttonname in codebehind then problem is solved) :)

              1 Reply Last reply
              0
              • S SIJUTHOMASP

                Hi, I am having an ASP.NET button inside a panel.But when I click on this it is not firing the event.."Click" and it is not giving to the page_init,page _load event on posting back..I tried with a new button added..It is still giving the same problem.. Any Idea will be much appreciated why this is happenening.. Pls show me the right way to resolve this.. Thank You, RPM

                N Offline
                N Offline
                Nagraj Naik
                wrote on last edited by
                #7

                Hi, I had same problem,But I solved that partially.Now Add new button in panel where your current button is present,Double click on new button it will go to code part just write anything and keep Breakpoint on statement,run your application and See whether brekpoint execure or not,then reply me. Regards,

                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