W
Wilson Wu
Hi,
I want to create a custom label control using the following code. But the
lable can't display. what is wrong ?
using System;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.ComponentModel;
namespace com.Index.WilsonWebClass
{
/// <summary>
/// Summary description for wLabel.
/// </summary>
///
[DefaultProperty("Text"),
ToolboxData("<{0}:wLabel runat=server></{0}:wLabel>")]
public class wLabel : System.Web.UI.WebControls.Label
{
private string text;
[Bindable(true),
Category("Appearance"),
DefaultValue("")]
public string Text
{
get
{
return text;
}
set
{
text = value;
}
}
/// <summary>
/// Render this control to the output parameter specified.
/// </summary>
/// <param name="output"> The HTML writer to write out to </param>
protected override void Render(HtmlTextWriter output)
{
output.Write(Text);
}
}
}
I want to create a custom label control using the following code. But the
lable can't display. what is wrong ?
using System;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.ComponentModel;
namespace com.Index.WilsonWebClass
{
/// <summary>
/// Summary description for wLabel.
/// </summary>
///
[DefaultProperty("Text"),
ToolboxData("<{0}:wLabel runat=server></{0}:wLabel>")]
public class wLabel : System.Web.UI.WebControls.Label
{
private string text;
[Bindable(true),
Category("Appearance"),
DefaultValue("")]
public string Text
{
get
{
return text;
}
set
{
text = value;
}
}
/// <summary>
/// Render this control to the output parameter specified.
/// </summary>
/// <param name="output"> The HTML writer to write out to </param>
protected override void Render(HtmlTextWriter output)
{
output.Write(Text);
}
}
}