Jack
Jack

Reputation: 10037

ASP.net: Weird web user control problem

This is weird. I declare a web user control on a asp.net web page like so

print("<%@ Register Src="~/Controls/blah.ascx" TagName="blahCtrl" TagPrefix="cc" %>");

I don't have problem with it until today in the code behind where it give me name blah is not declared error. does anyone know what cause this?

Upvotes: 0

Views: 101

Answers (1)

Matt
Matt

Reputation: 629

Try registering it on the .aspx source page not the .aspx.cs page.

Upvotes: 2

Related Questions