S
Saber
We have a simple user control containing a Label and a Textbox.
Its code behind:
public partial class uc : System.Web.UI.UserControl
{
private string _Title;
public string Title
{
get { return Label1.Text; }
set { Label1.Text = value; }
}
protected void Page_Load(object sender, EventArgs e){}
}
In runtime anything is going good,
But in "Design Mode" when we set a value to the Title property, like this:
<uc1:uc ID="Uc1" runat="server" Title="Hello" />
It doesn't displays Hello as the label text.
I read http://ajdotnet.wordpress.com/2006/11/11/reach-out-at-design-time/
but his solution works when we inherit from Label, not Web.UI.UserControl
Its code behind:
public partial class uc : System.Web.UI.UserControl
{
private string _Title;
public string Title
{
get { return Label1.Text; }
set { Label1.Text = value; }
}
protected void Page_Load(object sender, EventArgs e){}
}
In runtime anything is going good,
But in "Design Mode" when we set a value to the Title property, like this:
<uc1:uc ID="Uc1" runat="server" Title="Hello" />
It doesn't displays Hello as the label text.
I read http://ajdotnet.wordpress.com/2006/11/11/reach-out-at-design-time/
but his solution works when we inherit from Label, not Web.UI.UserControl