What is event handler in asp.net ?

Report
Question

Please briefly explain why you feel this question should be reported .

Report
Cancel

About event handler in asp.net.

in progress 0
.NET apeksha585 4 months 1 Answer 113 views 0

Answer ( 1 )

  1. Dishaa_29

    Please briefly explain why you feel this answer should be reported .

    Report
    Cancel

    An event is an action or occurrence such as a mouse click, a key press, mouse movements, or any system-generated notification. A process communicates through events. For example, interrupts are system-generated events. When events occur, the application should be able to respond to it and manage it.
    Events in ASP.NET raised at the client machine, and handled at the server machine. For example, a user clicks a button displayed in the browser. A Click event is raised. The browser handles this client-side event by posting it to the server.
    The server has a subroutine describing what to do when the event is raised; it is called the event-handler. Therefore, when the event message is transmitted to the server, it checks whether the Click event has an associated event handler. If it has, the event handler is executed.
    The general syntax of an event is:
    private void EventName (object sender, EventArgs e);

    Application and Session Events :

    The most important application events are:
    Application_Start- It is raised when the application/website is started.
    Application_End- It is raised when the application/website is stopped.
    Similarly, the most used Session events are:
    Session_Start- It is raised when a user first requests a page from the application.
    Session_End- It is raised when the session ends.

    Page and Control Events :

    Common page and control events are:
    DataBinding- It is raised when a control binds to a data source.
    Disposed- It is raised when the page or the control is released.
    Error- It is a page event, occurs when an unhandled exception is thrown.
    Init- It is raised when the page or the control is initialized.
    Load- It is raised when the page or a control is loaded.
    PreRender- It is raised when the page or the control is to be rendered.
    Unload- It is raised when the page or control is unloaded from memory.

Leave an answer

Browse

Captcha Click on image to update the captcha .

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>