如何突出显示.cs文件中的标签文本 [英] How to highlight the label text in .cs file

查看:88
本文介绍了如何突出显示.cs文件中的标签文本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

实际上我将值传递给.cs文件中的标签,我想强调该文本中的特定单词我传递给标签的内容。是否可以



以下是我的代码



lblGroupName.Text =选择联系到Assaign' + Session [GroupNameForContacts]。ToString()+'Group;



在上面的代码中我想突出显示Session [GroupNameForContacts]。ToString ()

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()

推荐答案

lblGroupName.Text =选择联系到Assaign + Session [GroupNameForContacts]。ToString()+ Group



Aatif

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

Aatif
Bangalore


是的你可以用此代码:



Yes you can do this with this code:

<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>





现在用Literal绑定你的文字。



请接受答案并投票解决你的问题。



Now bind you text with Literal.

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


这篇关于如何突出显示.cs文件中的标签文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆