asp.net RenderControl and html

Posted by kusanagi on Stack Overflow See other posts from Stack Overflow or by kusanagi
Published on 2010-04-09T08:28:29Z Indexed on 2010/04/09 8:33 UTC
Read the original article Hit count: 799

Filed under:
|
|
|

i use such code

protected override void Render(System.Web.UI.HtmlTextWriter writer)
        {

            writer.AddAttribute("class", "dd0");              
            if (!String.IsNullOrEmpty(this.LiLeftMargin))
            {
                writer.AddAttribute("style", string.Format("margin-left: {0}px", this.LiLeftMargin));
            }
            writer.RenderBeginTag("li");

            writer.AddAttribute("id", "dt1");
            writer.RenderBeginTag("div");

            writer.AddAttribute("class", "ddlink");
            this.HyperLink.RenderControl(writer);//i wand that render html <b>name</b>
            writer.RenderEndTag();
            writer.RenderEndTag();
        }

my HyperLink name contain html tags, like <b>name</b> but it render like this &lt;B&gt;name

how can i make text bold (tagn not ekraned)

© Stack Overflow or respective owner

Related posts about rendercontrol

Related posts about html