Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 553221
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T11:34:56+00:00 2026-05-13T11:34:56+00:00

I am looking for a link to instructions or a walkthru for Creating Custom

  • 0

I am looking for a link to instructions or a walkthru for Creating Custom Controls in Asp.net 3.5.

I have already looked at the following :

http://forums.asp.net/t/1385382.aspx : Turning an .ascx User Control into a Redistributable Custom Control asp.net 3.5

http://msdn.microsoft.com/en-us/library/aa479318.aspx : Turning an .ascx User Control into a Redistributable Custom Control asp.net 2.0

I think the two above links are for Composite Custom Controls which would be fine for now, as it seems it is easier to make a Composite rather than a full Custom control.

As per the instructions in the above link ( aa479318 ) , I created a user control MyControl.ascx file and published it, which was compiled it into a self contained .dll which was named App_Web_MyControl.ascx.cdcab7d2.

Then I put a

<%Register Assembly="App_Web_MyControl.ascx.cdcab7d2" 
              TagPrefix="cc" namespace="TheNamespace" %> 

in the aspx file (in another app) where I wanted to use the Custom Control, and I add a reference to the .dll assembly in the project.

The CustomControl name is not being recognized when I try creating it in the .aspx code by

<cc:MyControl ID="idname" runat="server" />

I get error Element ‘MyControl’ is not a known element.’

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T11:34:57+00:00Added an answer on May 13, 2026 at 11:34 am

    This is late, I know, but here goes..

    I successfully turned an .ascx UserControl into a redistributable dll by doing this:

    1. Created an ASP.NET Web Site project called AscxDll
    2. Developed my UserControl in said project at this location:
      ~/App_UserControls/RadioButtonQuestion.ascx.
    3. Published the Website project with only these settings ticked in the Publish Web Site dialog:

      Use fixed name and single page assemblies

      Emit debug information

    4. Open VS cmd prompt and run:
      aspnet_merge “C:\PrecompiledWebOutputDir\AscxDll” -o AssemblyName -r
    5. Copied the merged AssemblyName.dll to bin folder of another webapp/website project that needed it.
    6. In client project’s web.config, added this to pages\controls
      <add tagPrefix=”MyPrefix” namespace=”ASP” assembly=”AssemblyName”/>
    7. Added control to a web page in client project:
      <MyPrefix:app_usercontrols_radiobuttonquestion_ascx ID=”rbq1″ runat=”server” QuestionText=”Set by aspx source” />

    Note how it is registered in web.config using namespace=”ASP”, and how the tag on the web page has a few underscores in it <MyPrefix:app_usercontrols_radiobuttonquestion_ascx />
    This may be the key to where you’re going wrong?

    This worked well for me, although it took me AGES to figure out. It’s probably easier to just build a server control or composite control, unless your UI is very complex.

    Hope this helps somebody.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is a url like http://example.com/foo?bar valid? I'm looking for a link to something official
I'm looking to build a quick link directory access widget. e.g. (option 1) 0-9
Looking for feedback on : http://code.google.com/p/google-perftools/wiki/GooglePerformanceTools
Looking for C# class which wraps calls to do the following: read and write
Looking for suggestions on file system management tools. We have several terabytes of images,
I'm looking for some LaTeX template for creating quality output. On R-bloggers I've bumped
I've set up a Rails form roughly following the instructions in this Railscast. Here's
I'm looking for the ability when a link contains, for example /schedule/ in the
I've been looking for this answer, and all I found was this link ,
I am getting this error: FOR REAL Looking for database... com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.