Here's the situation...
I have web user control (.ascx) that has some properties I would like to define when the user control is added to the form. Currently I am under the impression that the code (c#) in the user control should be:
public string name
{
get
{
return name;
}
set
{
name = value;
}
}
and then in the web form's asp.net code I set the name when I declare the user control:
<uc1:WebUserControl1 id="WebUserControl11" name="testing" runat="server"></uc1:WebUserControl1>
If I don't declare the name there then it all works fine (except I have an unnamed control)
Can anyone see what I'm doing wrong?
I have web user control (.ascx) that has some properties I would like to define when the user control is added to the form. Currently I am under the impression that the code (c#) in the user control should be:
public string name
{
get
{
return name;
}
set
{
name = value;
}
}
and then in the web form's asp.net code I set the name when I declare the user control:
<uc1:WebUserControl1 id="WebUserControl11" name="testing" runat="server"></uc1:WebUserControl1>
If I don't declare the name there then it all works fine (except I have an unnamed control)
Can anyone see what I'm doing wrong?