Designer files rewrite custom control when markup changed.

Discussion in 'ASP .Net' started by Joe, May 12, 2008.

  1. Joe

    Joe Guest

    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, May 12, 2008
    #1
    1. Advertising

  2. Joe

    Joe Guest

    A good answer I got from another source.

    just put the declarations in the codebehind file instead of the
    designer file.
     
    Joe, May 13, 2008
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Anatoly
    Replies:
    1
    Views:
    404
    dave wanta
    Jun 29, 2003
  2. Replies:
    1
    Views:
    713
    Rosanne
    Oct 11, 2005
  3. Don
    Replies:
    1
    Views:
    169
    Andrew Backer
    Jul 19, 2005
  4. Don
    Replies:
    1
    Views:
    193
    Andrew Backer
    Jul 19, 2005
  5. mxbrunet
    Replies:
    1
    Views:
    228
Loading...

Share This Page