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

H

Hongbo

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
 
B

Bruce Barker

because a label is for rendering text, not html controls. use a link, or generic

-- bruce (sqlwork.com)
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,906
Latest member
SkinfixSkintag

Latest Threads

Top