PRB: Fatal Exception When You Click an Image in a Mobile AdRotator Control (309811)
The information in this article applies to:
- Microsoft Mobile Internet Toolkit (MMIT)
This article was previously published under Q309811 SYMPTOMS
When you use a Palm Vx device with the AU-System browser, the browser may stop responding (hang), or you may receive a "Fatal Exception" error message under the following circumstances:
- You open a page that uses the mobile AdRotator control.
-and-
- You click an image from the AdRotator control before the image has completely loaded.
This problem does not occur if the image is completely loaded.
RESOLUTION
You can use a device-specific rendering to work around this problem by eliminating the use of the mobile AdRotator control on the AU-System browser. To do this, follow these steps:
- Create a device filter in the Web.config file for the AU-System browser. For example:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.web>
<deviceFilters>
<filter name="isAUSystems" compare="Browser" argument="AU-System Demo WAP Browser"/>
</deviceFilters>
</system.web>
</configuration>
- In your mobile Web Forms page, use the DeviceSpecific class to create a DeviceSpecific template that can use the filter that renders specifically to the AU-System browser.
The sample code that follows creates a header in a mobile Web Form. This code sends a mobile Label control instead of the mobile AdRotator control to the AU-System browser. Note that this code sends the mobile AdRotator control to all other browsers.
<mobile:DeviceSpecific id="DeviceSpecific1" runat="server">
<Choice Filter="isAUSystems" >
<HeaderTemplate>
<mobile:Label id="Label1" runat="server">No Ad Rotator</mobile:Label>
</HeaderTemplate>
</Choice>
<Choice>
<HeaderTemplate>
<mobile:AdRotator id="AdRotator1" runat="server" AdvertisementFile="Ad.xml" />
</HeaderTemplate>
</Choice>
</mobile:DeviceSpecific>
STATUSThis behavior is by design.
The third-party products that are discussed in this article are manufactured by companies that are independent of Microsoft. Microsoft makes no warranty, implied or otherwise, regarding the performance or reliability of these products.
Modification Type: | Major | Last Reviewed: | 6/6/2002 |
---|
Keywords: | kbDSupport kbprb kbServerControls kbWMLDevice KB309811 |
---|
|