CodeVerge.Net Beta


   Item Entry   Register  Login  
Microsoft News
Asp.Net Forums
IBM Software
Borland Forums
Adobe Forums
Novell Forums




Can Reply:  No Members Can Edit: No Online: Yes
Zone: > Asp.Net Forum > visual_studio.visual_studio_2005 Tags:
Item Type: Date Entered: 1/20/2006 2:46:00 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
NR
XPoints: N/A Replies: 2 Views: 43 Favorited: 0 Favorite
3 Items, 1 Pages 1 |< << Go >> >|
"cakewalkr7" <>
NewsGroup User
where's the rest of my code?1/20/2006 2:46:00 PM

0

I just got the 05 upgrade and I'm a little unclear on some things.  I understand the basic concept of partial classes, but I haven't seen any examples of implementation where the logic for 1 page is split among many files.  Would it be that if I had default.aspx I'd have a default.aspx.cs file and then I could create a default_extras.cs and both of the cs files were marked as partial class default? 

Also, what happened to all of the page control declarations.  It used to be at the top above the page load that all variables and controls were declared, but I don't see that anymore.  Is there another file that this info is stored in?  If so, can I still declare controls above the page load method which might not actually be on the page yet but would be dynamically created later?  Thanks.

"StrongTypes" <
NewsGroup User
Re: where's the rest of my code?1/20/2006 4:14:01 PM

0

A partial class allows you to segment your class into multiple class files (see .NET Framework 2.0 quickie - partial classes). The nice thing about Visual Studio 2005 / .NET 2.0 is the elimination of extraneous code such as having to declare controls from your aspx file in code-behind as protected and wiring event handlers to page load events.
Ryan Olshan
Microsoft MVP, ASP.NET
Blog | Group | Website | Strong Coders Community

How to ask a question
"Mikhail Arkhip
NewsGroup User
Re: where's the rest of my code?1/20/2006 5:38:41 PM

0

The part with control declarations is auto-generated by runtime from the control declarations in markup, so you don't have to declare controls twice (in code and in the page markup). This file is invisible to you.
Thanks

------------------------------------------------------------

This posting is provided "AS IS" with no warranties, and confers no rights.
3 Items, 1 Pages 1 |< << Go >> >|




   
  Privacy | Contact Us
All Times Are GMT