Hi,
Once you create a user control,Create a getter and setter of each control on that user control code behind file.
here my user control lets say demoControl.ascx in that,
Suppose 1 label control is there,
<asp:label id="lblName" runat="server/" xmlns:asp="#unknown"></asp:label>
& in demoControl.ascx.cs ,
public Label LBL_Name
{
get
{
return lblName;
}
set
{
lblName = value;
}
}
Calling that user control in your required page.
<![CDATA[<%@ Register TagPrefix="demoTest" TagName="demoTest" Src="<User Control Path>" %>]]>
<demotest:demotest id="ucDemoControl" title="DemoControl" runat="server" xmlns:demotest="#unknown" />
& In codebehind,
ucDemoControl.LBL_Name.text="Code Project";