473,396 Members | 1,724 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Compile errors after converting to a Web Application Project from

I'm trying to convert a Web Site to the Web Application project model and I'm
running into compile errors that do not seem to be covered by the guidance I
found at "Converting a Web Site Project to a Web Application Project".

The issue is that standard ASP.NET controls that are embedded as child
controls within the ContentTemplate of the Ajax Control Toolkit's
TabContainer/TabPanel are no longer visible to the page (and result in
compile errors). It appears that they can only be referenced with a call to
FindControl whereas, when the project was a Web Site, they were directly
accessible in the page's code behind file as properties.

Unfortunately, we have a lot of webforms that utilize the TabContainer, and
converting all the references to child controls from simple property refences
to FindControl calls will be quite burdensome.

While researching the problem I found a reference to a property called
TemplateInstance that seemed promising, but I understand that this is
applicable to control designers, not control users.

I thought I'd add one other point. The problem is not specific to the Ajax
Control Toolkit's TabContainer. Indeed, I have a FormView control, and all
the child controls in the ItemTemplate are no longer recognized by the
compiler as being properies of the Page and result in compile errors. I can't
believe that I have to change all of these propery references to findcontrol
calls throughout my forms just because I moved from a Web Site to a Web
Application Project. :-(
Nov 21 '08 #1
1 2608
web applications are a bit of a hack. the codebehind are compiled by visual
studio, the aspx by the aspnet_compiler. because the partial classes are in
seperate dll's, there are more restrictions on code sharing (web site compile
the aspx and the code behind into one dll, so all parial class features are
available). to get around some of the restrictions, the ide generates those
designer files, which allows type information to be shared between the
partial classes (basically declaring server controls as protected global).

so yes, you have to do the convert. there is a performance cost to using
findcontrol, so you want to avoid this as much as possible.

i have never seen an advantage to switch to web applications, but have
converted web applications to web sites. (the main exception is MVC
applications, but then you don't have codebehind files).

-- bruce (sqlwork.com)
"Howard Pinsley" wrote:
I'm trying to convert a Web Site to the Web Application project model and I'm
running into compile errors that do not seem to be covered by the guidance I
found at "Converting a Web Site Project to a Web Application Project".

The issue is that standard ASP.NET controls that are embedded as child
controls within the ContentTemplate of the Ajax Control Toolkit's
TabContainer/TabPanel are no longer visible to the page (and result in
compile errors). It appears that they can only be referenced with a call to
FindControl whereas, when the project was a Web Site, they were directly
accessible in the page's code behind file as properties.

Unfortunately, we have a lot of webforms that utilize the TabContainer, and
converting all the references to child controls from simple property refences
to FindControl calls will be quite burdensome.

While researching the problem I found a reference to a property called
TemplateInstance that seemed promising, but I understand that this is
applicable to control designers, not control users.

I thought I'd add one other point. The problem is not specific to the Ajax
Control Toolkit's TabContainer. Indeed, I have a FormView control, and all
the child controls in the ItemTemplate are no longer recognized by the
compiler as being properies of the Page and result in compile errors. I can't
believe that I have to change all of these propery references to findcontrol
calls throughout my forms just because I moved from a Web Site to a Web
Application Project. :-(
Nov 22 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Qiao Yun | last post by:
I used vc++.net (visual studio .net ) to open a project which can work well in vc++6.0. I succeeded in compiling the project in vc++.net in release mode . But when I tried to compile the project...
4
by: Lowell | last post by:
Any tips for trouble shooting errors when the ASPX page won't even compile? What happens is that VS will "build" the code-behind object and the component that it instantiates, but when I navigate to...
0
by: BruinBySea | last post by:
Here is the problem. I built LibA and LibB as class library projects in the same solution as my web application HelloWorldWebApp. Wherever necessary I added project references. Everything...
1
by: Ravi Chaudhary | last post by:
Hi, We are using VS.Net 2003 and coding in VB.net. The solution has 38 projects; most of the projects in the solution reference other projects (without any circular references) and all the...
6
by: Kevin Atherton | last post by:
Hello. I work for a large web company, and we are in the process of converting our old .asp pages to .aspx with VB code-behind. The solution includes 8 projects, all of which are very...
27
by: Rene | last post by:
I keep getting the following error every time I compile the solution under VS 2005: ---------------- Error 5 Unable to copy file "obj\Debug\xyz.dll" to "bin\Debug\xyz.dll". The process...
0
by: Ramesh2006 | last post by:
Hi, The following error occurred when i programmatically compile another project from my present project. The Error: error CS0234:The type or namespace name 'Windows' does not exist in the...
1
by: John Dalberg | last post by:
I converted a working web site project to a web application project and I am getting a bunch of warnings and compile errors. All code using .NET's profile class is giving an error. example...
4
by: K Viltersten | last post by:
We have a project working well today and it's developed on VS2005. Since we're planing to switch to VS2008 in a soon future, i've been trying to move the project to VS2008 Express (Web...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.