Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

using ascx in html page

Status
Not open for further replies.

dinger2121

Programmer
Sep 11, 2007
439
US
HEllo,
I have created an ascx control for a navigation menu. When I run this in a sample aspx page in VS, it works perfectly. I then added an html page to my project, added the same code as in the aspx page, but it doesn't work. I am getting a warning in the markup where I have added the control - the warning is "unrecognized namespace 'uc1'".
at the beginning of the html page, I added the line -
<% Register TagPrefix="uc1" TagName="myNav" Src="myNav.ascx" %>

Does anyone have any idea what is missing?
Thanks for any thoughts.
 
it's not going to. html is static content. ascx is a server control which dyanmically renders html. you need to put the user control in either a master page or webform.

Jason Meckley
Programmer
Specialty Bakers, Inc.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top