Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Jul 17, 2009 09:47 AM by shahed.kazi
Member
89 Points
411 Posts
Jul 16, 2009 08:30 AM|LINK
Hi,
I have the litlar control
<asp:Literal runat="server" Text="Age*" />
my need is the * should be in red color.age should be in black color. is it possible to change * as red color? please share with me the idea
Participant
1083 Points
211 Posts
Jul 16, 2009 12:59 PM|LINK
Give it an ID, so you can access it in code, then do(in VB)
myLiteral.Text = "Age <span style=""color: red;"">*</span>"
In C# there's other ways to include the literal " character, but I'm sure you already know it if you're a C#'er ;)
Contributor
2424 Points
392 Posts
Jul 16, 2009 02:09 PM|LINK
You Can do this by in Code behind Adding HTML tag in Text Property of lieral Add line AgeLiteral.Text = "Age<font color\"red\">*</font>";
Please remember to click “Mark as Answer” on the post that helps you.
This can be beneficial to other community members reading the thread.
Star
11375 Points
2036 Posts
Jul 16, 2009 03:01 PM|LINK
Try this:
<asp:Literal runat="server" Text="Age<span style='color:red'>*<span>" />
Jul 17, 2009 09:41 AM|LINK
Hi Guys, Thanks you for the help.
All-Star
32487 Points
6742 Posts
Jul 17, 2009 09:46 AM|LINK
born2win Hi, I have the litlar control <asp:Literal runat="server" Text="Age*" /> my need is the * should be in red color.age should be in black color. is it possible to change * as red color? please share with me the idea
<asp:Literal runat="server" Text="Age<span style='color:red;'>*</span>" />
17953 Points
3635 Posts
Jul 17, 2009 09:47 AM|LINK
you can enter to html to literal text.
born2win
Member
89 Points
411 Posts
how to set color to litral text
Jul 16, 2009 08:30 AM|LINK
Hi,
I have the litlar control
<asp:Literal runat="server" Text="Age*" />
my need is the * should be in red color.age should be in black color.
is it possible to change * as red color? please share with me the idea
bgs264
Participant
1083 Points
211 Posts
Re: how to set color to litral text
Jul 16, 2009 12:59 PM|LINK
Give it an ID, so you can access it in code, then do(in VB)
myLiteral.Text = "Age <span style=""color: red;"">*</span>"
In C# there's other ways to include the literal " character, but I'm sure you already know it if you're a C#'er ;)
Pratik N
Contributor
2424 Points
392 Posts
Re: how to set color to litral text
Jul 16, 2009 02:09 PM|LINK
You Can do this by in Code behind Adding HTML tag in Text Property of lieral
Add line
AgeLiteral.Text = "Age<font color\"red\">*</font>";
Please remember to click “Mark as Answer” on the post that helps you.
This can be beneficial to other community members reading the thread.
alaa9jo
Star
11375 Points
2036 Posts
Re: how to set color to litral text
Jul 16, 2009 03:01 PM|LINK
Try this:
<asp:Literal runat="server" Text="Age<span style='color:red'>*<span>" />
Ala'a Alnajjar
----------------------------------------------------
My Webblog
born2win
Member
89 Points
411 Posts
Re: how to set color to litral text
Jul 17, 2009 09:41 AM|LINK
Hi Guys, Thanks you for the help.
venkatu2005
All-Star
32487 Points
6742 Posts
Re: how to set color to litral text
Jul 17, 2009 09:46 AM|LINK
<asp:Literal runat="server" Text="Age<span style='color:red;'>*</span>" />
Thanks.
shahed.kazi
All-Star
17953 Points
3635 Posts
Re: how to set color to litral text
Jul 17, 2009 09:47 AM|LINK
you can enter to html to literal text.
.NET World |Captcha Control