re:
!> Where VB.NET can select the object and event for page events,
!> but in C# we have to explicitly type the event handler method.
Here's the trick...
In both VS 2005 and VS2008 :
If you use inline code, whether C# or VB.NET, you don't have to type the event handler method.
If you use code-behind in C#, you do have to type the event handler method.
If you use code-behind in VB.NET, you don't have to type the event handler method.
In C#, if you configured <pages autoEventWireup , in web.config, to "true":
<system.web>
<pages autoEventWireup="true" />
</system.web>
and then, if you select an inline code page in a VS 2005/2008 C# project,
select "Page" from the dropdown "Server Objects and Events"
and select "Init" from the right-hand dropdown, the IDE writes this :
<script runat="server">
protected void Page_Init(object sender, EventArgs e)
{
}
</script>
If you select "place code in separate file" (code-behind),
neither of the 2005/2008 IDEs list the Page Events.
However, in both VS 2005 and 2008, when using VB.NET,
you don't need to set <pages autoEventWireup to "true"
in web.config in order to be able to select Events in the IDE.
Juan T. Llibre, asp.net MVP
asp.net faq :
http://asp.net.do/faq/
foros de asp.net, en español :
http://asp.net.do/foros/
======================================
Yes, I think the AutoEventWireUp is the clue.
And Since I jump from VS2003 to VS2008. I didn't aware something that
had changed since 2005.
It seems like it had been like this since VS2005. Where VB.NET can
select the object and event for page events, but in C# we have to
explicitly type the event handler method.