PRB: Property Override Does Not Run Device-Specific Code (309804)



The information in this article applies to:

  • Microsoft Mobile Internet Toolkit (MMIT)

This article was previously published under Q309804

SYMPTOMS

When you apply a property override on a mobile control, you may find that the device-specific properties are not applied to the control at run time.

CAUSE

The problem occurs when you use the following tag to define device-specific properties:
<mobile:DeviceSpecific>
				

RESOLUTION

To work around this problem, use the following tag to define device-specific properties:
<DeviceSpecific>
				

STATUS

This behavior is by design.

MORE INFORMATION

The <mobile:DeviceSpecific> tag is valid when you use a device-specific control directly on a form or within a template. However, when you use this tag within a property override, the property override does not run.

Steps to Reproduce the Behavior

  1. Create a mobile Web Application, and add a mobile Web Form to the application.
  2. Within the mobile designer, switch from Design view to HTML view.
  3. Add the following code between the <Mobile Form> tags:
    <mobile:Image id="Image1" runat="server">
       <mobile:DeviceSpecific>
    	<Choice AlternateText="Alternate Text" Filter="isHTML32"></Choice>
       </mobile:DeviceSpecific>
    </mobile:Image>
    					
  4. Compile the project, and view the page in an HTML Web browser. Notice that the alternate text does not appear.

Modification Type:MajorLast Reviewed:6/14/2002
Keywords:kbDeviceSpecific kbDSupport kbExtensibility kbHTMLDevice kbprb kbtemplate KB309804