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. how to view event binding code in vs.net 2005 for aspx page

how to view event binding code in vs.net 2005 for aspx page

Scheduled Pinned Locked Moved ASP.NET
csharpvisual-studiowpfwcfalgorithms
6 Posts 2 Posters 1 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
    ashu_sharma21
    wrote on last edited by
    #1

    Hi, One of my button is not firing its event so i thought of binding the event manually to the function but when i tried searching event binding code in vs.net 2005 i couldnt find it. Please help how can i reach to event binding code in vs.net 2005. Ashu Sharma

    M 1 Reply Last reply
    0
    • A ashu_sharma21

      Hi, One of my button is not firing its event so i thought of binding the event manually to the function but when i tried searching event binding code in vs.net 2005 i couldnt find it. Please help how can i reach to event binding code in vs.net 2005. Ashu Sharma

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

      Hi there, The ASP.NET 2.0 in VS 2005 by default uses the declarative manner to register the handler for the event of the control in the web page .aspx. For example with the button in the web page, you should find something like this in the control markup:

      ... OnClick="..." ...

      A 1 Reply Last reply
      0
      • M minhpc_bk

        Hi there, The ASP.NET 2.0 in VS 2005 by default uses the declarative manner to register the handler for the event of the control in the web page .aspx. For example with the button in the web page, you should find something like this in the control markup:

        ... OnClick="..." ...

        A Offline
        A Offline
        ashu_sharma21
        wrote on last edited by
        #3

        Thanks, then at what place 'initializecomponent' function from aspx page is called. Please suggest Ashu sharma

        M 1 Reply Last reply
        0
        • A ashu_sharma21

          Thanks, then at what place 'initializecomponent' function from aspx page is called. Please suggest Ashu sharma

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

          You will not see the common method InitializeComponent used in the code behind of a web page in the ASP.NET 2.0. And the event handler is now registered to the Click event of the button in the dynamic class that the ASP.NET generates to represent the web page. You can have a look at this dynamic class in the temp folder of the ASP.NET application for more information.

          A 1 Reply Last reply
          0
          • M minhpc_bk

            You will not see the common method InitializeComponent used in the code behind of a web page in the ASP.NET 2.0. And the event handler is now registered to the Click event of the button in the dynamic class that the ASP.NET generates to represent the web page. You can have a look at this dynamic class in the temp folder of the ASP.NET application for more information.

            A Offline
            A Offline
            ashu_sharma21
            wrote on last edited by
            #5

            Ok.. then what shall I do if my event functions are not getting called in my web page because initially whenever i faced this problem, I used to manually bind function with the control event and was able to run it. Please suggest Ashu Sharma

            M 1 Reply Last reply
            0
            • A ashu_sharma21

              Ok.. then what shall I do if my event functions are not getting called in my web page because initially whenever i faced this problem, I used to manually bind function with the control event and was able to run it. Please suggest Ashu Sharma

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

              VS 2003 by default uses the code behind to contain the code to regsiter the event handlers, however this model is changed in VS 2005, but you can still register the event handler for the Click event in the code behind without having any problem. So if the Click event handler does not get fired, then there are a couple of things that you can check: + If the button is declared in the web page .aspx, make sure that you also declare the event handler. + The handler is registered before the event gets fired. Btw, you may want to post your code snippets (ASP.NET markup and code-behind if any) when you don't find any clue.

              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