views:

233

answers:

2

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 in Single Instance Templates that seemed promising, but I understand that this is applicable to control designers, not control users. Any help would be much appreciated.

A: 

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. :-(

Decker
A: 

I'd be curious to hear what your final decision was to resolve this.

Reading your post, compared with my own current web app conversion research, leads me to venture out and refer you to this page hoping it may shed some light on what happens with your code-behind file upon conversion and compilation.

Cameron
We gave up trying to migrate the site to a Web Project. I was trying to move it to the MVC model -- primarily to introduce some real Ajax pages, but realized that this was unnecessary; you can do true Ajax with WebForms -- you just have to be careful.
Decker