I have a application page and had all user controls on it working fine. If i have to create a site page how can i deploy those user controls on the newly created site page ??
2 Answers
In SharePoint designer, copy the Register and User tag from your application page into the site page (.aspx). Or, just create them manually with this syntax. You should put the Register tag up top below the others and instantiate wherever makes sense to you
<%@Register Tagprefix="ucSA" TagName="SysAlerts" Src="~/_controltemplates/15/SysAlerts/UserControl.ascx"%>
<ucSA:SysAlerts runat="server" EnableViewState="false"/>
Other options:
A more practical solution would be to create a new Page layout and put the User Controls reference in there.
Is the User Control a Visual Web Part? Simply add them to a Web Part Zone within the site page if so.
This has been mentioned before, but something I am about to dive into as well. This post should help in shedding some light...