PRB: MMIT Controls HTML-Encode the Text Property (311008)



The information in this article applies to:

  • Microsoft Mobile Internet Toolkit (MMIT)

This article was previously published under Q311008

SYMPTOMS

When you set the Text property of a Microsoft Mobile Internet Toolkit (MMIT) control, you may notice that the text becomes HTML-encoded.

CAUSE

This behavior occurs because MMIT controls (except for the TextView control) encode the text with HTML in the Text property.

STATUS

This behavior is by design.

MORE INFORMATION

Steps to Reproduce the Behavior

  1. Create a mobile Web Application.
  2. In Design view, drag a Link control onto the Web Form.
  3. In the properties window, type the following in the Text property:  
When you switch back to HTML mode, you see the following code:
<mobile:Link id=Link1 runat="server">&amp;nbsp;</mobile:Link>
				
When this code is displayed in a browser, you see the actual text that was entered as the Text property, which is &nbsp;; however, if you view the source code of the page, you see the following

&amp;nbsp;

because the Text property HTML-encodes any text that is passed to it.

Modification Type:MajorLast Reviewed:6/14/2002
Keywords:kbDSupport kbprb kbServerControls KB311008