B
Brad Baker
I'm building a small web application - I started out placing all my code in
one file (config.aspx). As I continue to add code though it was becoming
very unwieldy.
After doing some searching online I found an article which suggested I might
place some of the code into web user controls. I created two new files
(general_info.ascx and store_front.ascx) and placed two chunks of code in
each.
I then registered the controls at the top of config.aspx:
<%@ Register TagPrefix="UU" TagName="general_info" Src="~/general_info.ascx"
%>
<%@ Register TagPrefix="UU" TagName="store_front" Src="~/store_front.ascx"
%>
And I also add the controls to config.aspx:
<UU:general_info id="general_info1" runat="server" />
<UU:store_front id="store_front1" runat="server" />
However I'm getting the following errors:
Element 'general_info' is not a known element. This can occur if there is a
compilation error in the Web site.
Element 'store_front' is not a known element. This can occur if there is a
compilation error in the Web site.
I can't seem to figure out where I went wrong. I'm a bit new at
csharp/asp.net so I'm sure I'm just doing something stupid wrong. Could
anyone point me in the right direction?
Thank You,
Brad Baker
one file (config.aspx). As I continue to add code though it was becoming
very unwieldy.
After doing some searching online I found an article which suggested I might
place some of the code into web user controls. I created two new files
(general_info.ascx and store_front.ascx) and placed two chunks of code in
each.
I then registered the controls at the top of config.aspx:
<%@ Register TagPrefix="UU" TagName="general_info" Src="~/general_info.ascx"
%>
<%@ Register TagPrefix="UU" TagName="store_front" Src="~/store_front.ascx"
%>
And I also add the controls to config.aspx:
<UU:general_info id="general_info1" runat="server" />
<UU:store_front id="store_front1" runat="server" />
However I'm getting the following errors:
Element 'general_info' is not a known element. This can occur if there is a
compilation error in the Web site.
Element 'store_front' is not a known element. This can occur if there is a
compilation error in the Web site.
I can't seem to figure out where I went wrong. I'm a bit new at
csharp/asp.net so I'm sure I'm just doing something stupid wrong. Could
anyone point me in the right direction?
Thank You,
Brad Baker