Visual Studio 2005: Questions

M

Mark

Hi everyone, I am having a tinker around with Visual Studio Professional
2005 and I am building a simple website:

Now, in 1.1 the event handlers were declared in the code behind page and you
could add in your own custom event handlers there

e.g.

#region Web Form Designer generated code
override protected void OnInit(EventArgs e)
{
InitializeComponent();
MyObject.EventClicked+=new Object.Clicked(FunctionNameToBeCalled);
base.OnInit(e);
}
#endregion

I notice that this is missing from VS2005 and is stored in a seperate file,
can someone please tell me where this file is stored and *If* I make changes
to it will the compiler overwrite my changes when I rebuild th solution.

Also, if there is a nice VS2005 FAQ for VS2003 developers in regards to the
IDE etc, please post the URL

TIA
Mark
 
S

Scott Allen

For C#, notice the default AutoEventWireup value is true, meaning the
Page level event handlers are looked up at runtime based on the name
(Page_EventName).

If you want, you can still override OnInit and add event handlers in
the same way.

There is no hidden file with event wire up code.
 
M

Mark

Hi Scott, thanks for your help
Regards
Mark

Scott Allen said:
For C#, notice the default AutoEventWireup value is true, meaning the
Page level event handlers are looked up at runtime based on the name
(Page_EventName).

If you want, you can still override OnInit and add event handlers in
the same way.

There is no hidden file with event wire up code.
 

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. After that, you can post your question and our members will help you out.

Ask a Question

Top