Click here to Skip to main content
15,895,084 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Actually i am passing value to the label from .cs file here i want to highlight the particular word in that text what i am passing to the label. is it possible

below is my code

lblGroupName.Text = "Select Contact To Assaign '" + Session["GroupNameForContacts"].ToString() + "' Group" ;

in the above code i want to highlight the Session["GroupNameForContacts"].ToString()
Posted
Comments
jaideepsinh 4-Jul-13 8:54am    
Check my solution this will i already use in my project.

lblGroupName.Text = "Select Contact To Assaign + Session["GroupNameForContacts"].ToString() "+Group"

Aatif
Bangalore
 
Share this answer
 
Yes you can do this with this code:

XML
<asp:Label ID="Label1" runat="server">
                    <asp:Literal ID="lit1" runat="server" Text=""></asp:Literal>
                    <br />
                    <font color="blue">
                        <asp:Literal ID="lit2" runat="server" Text=""></asp:Literal></font>
                </asp:Label>


Now bind you text with Literal.

Pls, accept as answer and give vote is solve you problem.
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900