all groups > asp.net mobile > september 2004 >
You're in the

asp.net mobile

group:

Text and color


Text and color Sara T.
9/30/2004 4:14:43 AM
asp.net mobile:
How can I display a text in different color in one line by using
mobilecontrol?

i.e.
This is a boy

If I need to see the word "is" in red color, is there any solution.

Sara T.

Re: Text and color NetDragonKing (NDK)
10/2/2004 11:14:37 AM
Dear Sara,

It uses the property Text of the Controls, for examples, with a label =
named lblExample:


private void Page_Load(object sender,System.EventArgs e)
{
lblExample.Text=3D"<h1>This <font color=3D'red'>is</font> a =
boy</h1>";
}






........................


Daniel Andrade
MCP (Microsoft Certificated Professional)
Developer Microsoft 4 stars
Guayaquil-Ecuador
www.gratisweb.com/dotnet








[quoted text, click to view]
Re: Text and color Sara T.
10/5/2004 10:28:22 PM
I try to use your technique but it doen't work. The label on mobileform =
will generate the text as following on the screen:

<h1>This <font color=3D'red'>is</font> a boy</h1>

And when I see in View Source on IE, it is translated to:

&lt;h1&gt;This &lt;font color=3D'red'&gt;is&lt;/font&gt; a =
boy&lt;/h1&gt;

Eventhough I change the label control to textvuew control, it doesn't =
work too.

Sara T.

[quoted text, click to view]
Dear Sara,

It uses the property Text of the Controls, for examples, with a label =
named lblExample:


private void Page_Load(object sender,System.EventArgs e)
{
lblExample.Text=3D"<h1>This <font color=3D'red'>is</font> a =
boy</h1>";
}






.......................


Daniel Andrade
MCP (Microsoft Certificated Professional)
Developer Microsoft 4 stars
Guayaquil-Ecuador
AddThis Social Bookmark Button