VBAHole22 Posted October 25, 2005 Posted October 25, 2005 I'm just starting out in asp.net 2.0 and finding out alot of things have changed. Alot of things. Anyway I'm writing a website that has a main default page with a few divs for header and nivigation and whatnot. Then I make user controls and swap them in the middle pane. Real simple like. In VS03 I would have all of my pages in a namespace and then things like data tier access in another namespace for neatness. But now when I generate a control in 2.0 I don't get a namespace attirbute on the top, instead I get a partial class. When I try to add the namespace in the code behind I get an error about the partial class name not jiving with the inherits tag and maybe I'm not doing something correctly Error 1 Make sure that the class defined in this code file matches the 'inherits' attribute, and that it extends the correct base class (e.g. Page or UserControl) Can I no longer have namespaces like I used to? Quote Wanna-Be C# Superstar
Administrators PlausiblyDamp Posted October 25, 2005 Administrators Posted October 25, 2005 If you look at the html in the aspx file, at the top there should be an @Page directive, find the inherits=".." attribute and modify this so it also includes the namespace. Then again if you are using 2005 have you considered moving to a masterpage form of layout - will make a easier solution than usercontrols for this kind of thing. Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
VBAHole22 Posted October 26, 2005 Author Posted October 26, 2005 Cool. That worked. I think I will switch over to the masters. Thanks Quote Wanna-Be C# Superstar
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.