The CodeBehind attribute is no longer supported in Visual Studio 2005. Code-behind was replaced with code-beside. Take a look at this article:
ASP.NET V2.0: Code-Beside Replaces Code-Behind. Visual Studio 2005 shouldn't be adding the codebehind atribute. Create a new
web page and post what VS generates for the web forms Page directive.
I suspect you are seeing that warning because you are using the VS 2005 Web Application Project preview. If so, you can safely ignore the warning -- it is there in the current preview build, but will go away with the refreshed build later this month.
chipsw
Member
25 Points
5 Posts
"Codebehind no longer supported"
Mar 03, 2006 11:54 PM|LINK
Then why does VS 2005 add that syntax into every new page I create? And then flag it as an error?
StrongTypes
All-Star
30801 Points
6013 Posts
ASPInsiders
Re: "Codebehind no longer supported"
Mar 04, 2006 02:04 AM|LINK
The CodeBehind attribute is no longer supported in Visual Studio 2005. Code-behind was replaced with code-beside. Take a look at this article: ASP.NET V2.0: Code-Beside Replaces Code-Behind. Visual Studio 2005 shouldn't be adding the codebehind atribute. Create a new web page and post what VS generates for the web forms Page directive.
HTH,
Ryan
ScottGu
All-Star
18285 Points
2008 Posts
Microsoft
Moderator
Re: "Codebehind no longer supported"
Mar 05, 2006 12:25 PM|LINK
Hi Chip,
I suspect you are seeing that warning because you are using the VS 2005 Web Application Project preview. If so, you can safely ignore the warning -- it is there in the current preview build, but will go away with the refreshed build later this month.
Hope this helps,
Scott