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.
 
Joined
Jan 8, 2008
Messages
2
Reaction score
0
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.

--
Scott
http://www.OdeToCode.com/blogs/scott/

On Mon, 2 Jan 2006 16:59:02 +1300, "Mark" <[email protected]>
wrote:

>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
>
Scott,

I am also having trouble finding InitializeComponent() in VS2005. Can you provide a few more details, screen shots, code samples, that will help me find it?

Thanks,
-smc
 

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

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top