Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Designer files rewrite custom control when markup changed.

1 view
Skip to first unread message

Joe

unread,
May 12, 2008, 10:52:55 AM5/12/08
to
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?

Joe

unread,
May 12, 2008, 9:04:28 PM5/12/08
to
A good answer I got from another source.

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

0 new messages