Last post May 31, 2008 07:08 AM by shakti5385
Oct 30, 2006 11:25 AM|ttawin|LINK
I have a user control (Site_Header.ascx) with some custom properties. The user control inherits from a class named "Control_Site_Header" in the code-behind file.
In a separate webform, I load the user control as follow:
Control_Site_Header m = (Control_Site_Header) this.LoadControl("~/Control/Site_Header.ascx");
m.CustomProperty1 = "Value";
However, Visual Studio 2005 keep complain that there is no such type called "Control_Site_Header". In Visual Studio 2003, this code will compile just fine. Does anyone knows if this coding style is still possible in Visual Studio 2005?
I am doing a code-conversion of a web application from dotNet1.1 to dotNet2.0 and I have learned that there are quite alot of differences between Visual Studio 2003 and Visual Studio 2005, paricularly:
- folder/file structure (all class files must be located in App_Code folder (except for code-behind files related to WebForm)
- compilation modes and resulted assembly files
- In Visual 2003, C# add namespace to each WebForm, but not in 2005
Oct 31, 2006 01:37 PM|joeaudette|LINK
You'll find it easier to migrate web apps from VS 2003 to VS 2005 if you use the newer VS 2005 Web Application Project type. It did not ship with VS 2005 but was released later. You can download it here
and learn more about it here
Its much more similar to the VS 2003 web app so its an easier conversion by far.
Hope it helps,
May 31, 2008 07:08 AM|shakti5385|LINK