how to add webform-eventhandlers ??

Discussion in 'ASP .Net' started by Christian Cambier, Jul 23, 2008.

  1. Hi,

    in VS.NET 2008, how do I know what form-eventhandler exist?
    how can I add a form-eventhandler in the code-behind file apart from

    cause when I select the properties of the webform, i don't see the
    lightning-bolt as is the case in WinForms in C#.

    any suggestion?

    thank you
    Christian Cambier, Jul 23, 2008
    1. Advertisements

  2. In code-behind, you can start by typing override and that will show you
    which events you can override with your own. The main difference is you're
    creating an event handler to handle an action in the same way since the
    handlers for the page are already defined and used, which means you need to
    override the current definition with your own so you can handle existing
    events such as PreRender and OnLoad.

    Hope this helps,
    Mark Fitzpatrick
    Microsoft MVP - Expression
    Mark Fitzpatrick, Jul 23, 2008
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.