469,601 Members | 2,039 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,601 developers. It's quick & easy.

Help: Why <mobile:label> doesn't render HTML tag?

Hi,

I have a mobile form:
===
<body Xmlns:mobile="http://schemas.microsoft.com/Mobile/WebForm">
<mobile:Form id=Form1 runat="server">
<mobile:label runat="server" id="lblT" />
</mobile:Form>
</body>
===

In the code behind page, I have:
===
protected System.Web.UI.MobileControls.Form Form1;
protected System.Web.UI.MobileControls.Label lblT;

private void Page_Load(object sender, System.EventArgs e)
{
lblT.Text="<a href=\"/default.aspx\">default</a>";
}
===

But when I run the page, the mobile:label displays the source code of the hyperlink as:
<a href=\"/default.aspx\">default</a>

It seems that mobile:label doesn't render HTML tag.

Would you please tell me why mobile:label behave like this? Are there ways that can
allow mobile:label to render HTML tag properly?

Thank you

Hongbo
Dec 28 '05 #1
1 1715
because a label is for rendering text, not html controls. use a link, or generic

-- bruce (sqlwork.com)
"Hongbo" <ho****@goodoffices.com> wrote in message news:ul**************@TK2MSFTNGP11.phx.gbl...
Hi,

I have a mobile form:
===
<body Xmlns:mobile="http://schemas.microsoft.com/Mobile/WebForm">
<mobile:Form id=Form1 runat="server">
<mobile:label runat="server" id="lblT" />
</mobile:Form>
</body>
===

In the code behind page, I have:
===
protected System.Web.UI.MobileControls.Form Form1;
protected System.Web.UI.MobileControls.Label lblT;

private void Page_Load(object sender, System.EventArgs e)
{
lblT.Text="<a href=\"/default.aspx\">default</a>";
}
===

But when I run the page, the mobile:label displays the source code of the hyperlink as:
<a href=\"/default.aspx\">default</a>

It seems that mobile:label doesn't render HTML tag.

Would you please tell me why mobile:label behave like this? Are there ways that can
allow mobile:label to render HTML tag properly?

Thank you

Hongbo
Dec 28 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

11 posts views Thread by Henrry Pires | last post: by
2 posts views Thread by rufpirat | last post: by
9 posts views Thread by rn5a | last post: by
4 posts views Thread by bleachie | last post: by
9 posts views Thread by =?Utf-8?B?RGFuaWVs?= | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.