Pass HTML Element in Asp.net Label dynamically

Hi Techies,

Sometimes we need dynamic multiple HTML Tag inside server side control like "Label". So in this case we are doing following type code.



ASPX Page

  <asp:Label ID="lblText" Text="Test" runat="server"></asp:Label>

CS.

            lblText.Text += "<label> Hi </label> ";
            lblText.Text += "<br />";
            lblText.Text += "<br />";




Thanks

Pass HTML Element in Asp.net Label dynamically Pass HTML Element  in Asp.net Label dynamically Reviewed by Ashwani on November 20, 2018 Rating: 5

No comments:

Powered by Blogger.