Designer files rewrite custom control when markup changed.

J

Joe

asp.net 2.0

I recently converted a website project to a WAP. I the process I have
moved our composite controls into their own subfolder. I have removed
the Register directives from the individual pages to the web.config.

The problem is every time I check out a page from SS and change the
markup the partial page file is rewritten. All my custom user
controls are changed to type UserControl.

the file starts like this:
private MyCustomControl customControl1;

Changes to this:
private UserControl customControl1;

This causes compile errors because of custom properties and events.
The aspx file does not have any errors. It recognizes the user
controls. The custom tags show up in the intellisense.

How can I get it to stop rewritting the partial class with the wrong
types?
 
J

Joe

A good answer I got from another source.

just put the declarations in the codebehind file instead of the
designer file.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,989
Messages
2,570,207
Members
46,783
Latest member
RickeyDort

Latest Threads

Top