C# – Where is Page Event List in C#

c

I'm VB.NET developer and recently I start working on C# projects.

In VB code behind page within VS.NET (2005/2008) when select "Page" on the LHS dropdownlist, the RHS ddl automatically display the list of all the page events that are available (Page_Load, Page_Init, Page_PreRender …)
So to write the code for Page_Init event, you simply just select the Paeg_Init and vs.net will generate the Page_Init method code.

How do you do this in C#? I know that you can manually write the methods code:
protected void Page_PreRender(object sender, EventArgs e)
{

}

But isn't it handy to have the page event list available to choose?

Best Answer

Try typing override and then space. Visual Studio will filter the intellisense window to display only virtual methods from the base class.

Also if you select one of these, Visual Studio will stub out the override method for you.

Related Topic