locked
Web Deployment Projects for Shared User Controls RRS feed

  • Question

  • User-614861832 posted

     I have successfully managed to create a web deployment project that compiles a bunch of user controls in a web application project. This works nicely for sharing user controls in other web application projects. I use Page.LoadControl to load the user controls dynamically. The web deployment project put the user controls in an assembly with each user control having a name like ASP.MyUserControl_ascx, where ASP. is the default namespace created either by aspnet_compiler or aspnet_merge. I was wondering if there was some way to get it use a different namespace, like MyUserControls.Library, for example.

    Thanks,

    John

     

    Monday, July 20, 2009 3:37 PM

Answers

  • User372121194 posted

    Hi,

    In ASP.NET website, the root namespace cannot be changeg, so the type name could be  ASP.[page]_aspx or ASP.[control]_ascx.

    But you change the class name using ClassName attribute in the @Page directive in page or control page. It will be ASP.[YourClassName].

     

    Thanks.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Saturday, July 25, 2009 12:49 PM

All replies

  • User372121194 posted

    Hi,

    In ASP.NET website, the root namespace cannot be changeg, so the type name could be  ASP.[page]_aspx or ASP.[control]_ascx.

    But you change the class name using ClassName attribute in the @Page directive in page or control page. It will be ASP.[YourClassName].

     

    Thanks.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Saturday, July 25, 2009 12:49 PM
  • User-1827453801 posted

    You can specifiy a full name for the class in the ClassName attribute. I just tried ClassName="Moo.TestFirst"

    The output switch from being ASP.TestFirst to Moo.TestFirst. They may be unknown sideeffects however.

    Monday, April 11, 2011 12:35 AM