adding a user control in another ascx page [Resolved]

Posted by Praveen7k under Regular Expressions on 3/10/2011 | Points: 10 | Views : 8892 | Status : [Member] | Replies : 3
can we add a user control in another ascx page




Responses

Posted by: SheoNarayan on: 3/10/2011 [Administrator] HonoraryPlatinum | Points: 50

Up
0
Down

Resolved
Yes Praveen, why not?

Follow the same steps as if you are using into the .aspx or .master page. For example, add Register directives in the user control like below

<%@ Register TagPrefix="SF" TagName="MainMenu" Src="~/include/MainMenu.ascx" %>


Add tag into the user control wherever you want.

<SF:MainMenu runat="Server" EnableViewState="False" ID="MM1" />


Thanks

Regards,
Sheo Narayan
http://www.dotnetfunda.com

Praveen7k, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Madhu.b.rokkam on: 3/11/2011 [Member] [MVP] Bronze | Points: 50

Up
0
Down

Resolved
Yes you can difinitely you that just drag drop the first user control onto second one in design window.

Thanks and Regards
Madhu

Praveen7k, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Karthikanbarasan on: 3/11/2011 [Member] [Moderator] [Microsoft_MVP] [MVP] Silver | Points: 50

Up
0
Down

Resolved
Check this link...

http://forums.asp.net/p/1117156/1735519.aspx

Thanks
Karthik
www.f5Debug.net

Praveen7k, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response