Interview questions

.Net - how to declare and raise events from your application

Next question>>           Learn .NET
.Net - Explain how to declare and raise events from your application. - June 03, 2009 at 11:00 AM by Shuchi Gauri

Explain how to declare and raise events from your application.

Declare Events: “Event” keyword is used to declare an event.

public delegate void MyCustomHandler(object o, MyEventArgse);

public class MyEventArgs: EventArgs
    public readonly int Age;
    public MyEventArgs(int age)
          Age = age;

public class MyCustomListener
       public void Show(object o, MyEventArgs e)
                "Age is {0}",

Next question>>

Also read 

ASP.NET exception handling technique

Define Exception handling in ASP.NET.
What are the ways of handling exceptions in ASP.NET?
Explain Try/catch block method of exception handling.
Define Error Events.
Define Custom Error Pages.
Why is exception handling important to an application?
When can you use tracing with exception handling?................

ASP.NET Handling the DataList control events

The Repeater, DataList, and DataGrid controls support event bubbling. What is event bubbling? Event Bubbling refers to the ability of a control to capture the events in a child control and bubble up the event to the container whenever an event occurs...........

What are the events in GLOBAL.ASAX file?

Global.asax file contains the following events: Application_Init, Application_Disposed, Application_Error, Application_Start, Application_End............

ASP.NET application life cycle and events processing

A web application starts when a browser requests a page of the application first time. The request is received by the IIS which then starts ASP.NET worker process (aspnet_wp.exe). The worker process then allocates a process space to the assembly and loads it.............

ASP.NET server control events

ASP.NET web form supports many server controls like Button, TextBox etc. Each control has associated events. There are three types of server control events..............

ASP.NET server controls vs. HTML controls

Server events, State management, Browser detection, Properties.............

Write your comment - Share Knowledge and Experience


Latest placement tests
Latest links
Latest MCQs
» General awareness - Banking » ASP.NET » PL/SQL » Mechanical Engineering
» IAS Prelims GS » Java » Programming Language » Electrical Engineering
» English » C++ » Software Engineering » Electronic Engineering
» Quantitative Aptitude » Oracle » English » Finance
Home | About us | Sitemap | Contact us | We are hiring