PRB: A TextBox Control Does Not Render After an Anchor Tag (311049)



The information in this article applies to:

  • Microsoft Mobile Internet Toolkit (MMIT)

This article was previously published under Q311049

SYMPTOMS

When you use the Openwave 3.x and 4.x browsers and emulators by Phone.com, you may notice that a TextBox control does not render.

CAUSE

If your code creates an anchor (a Link control) that is followed by a TextBox, the anchor needs to render on one card that is followed by the TextBox on another card. You have to click a button to navigate to the TextBox.

STATUS

This behavior is by design.

MORE INFORMATION

Steps to Reproduce the Behavior

Add the following code to an .aspx page, and then view the page in an Openwave 3.x or 4.x browser:
<%@ Register TagPrefix="mobile" Namespace="System.Web.UI.MobileControls" Assembly="System.Web.Mobile" %>
<%@ Page language="c#" Inherits="System.Web.UI.MobileControls.MobilePage" %>
  
  <mobile:Form id=Form1 runat="server">
    <mobile:Link id=Link1 Text="Link" runat="server">Link</mobile:Link>
    <mobile:TextBox id=TextBox1 Text="TextBox" runat="server"></mobile:TextBox>
  </mobile:Form>
				
After you add the code to the .aspx page, the code generates the following Wireless Markup Language (WML); it also produces two <card> elements:
<card>
  <onevent type="onenterforward">
    <refresh>
      <setvar name="TextBox1" value="TextBox"/>
    </refresh>
  </onevent>
  <do type="accept" label="Go">
    <go href="/KbBash/AnchorTextBox.aspx" method="post">
      <postfield name="__EVENTTARGET" value="Form1" />
      <postfield name="__EVENTARGUMENT" value="$(Form1)" />
      <postfield name="TextBox1" value="$(TextBox1)" />
    </go>
  </do>
  <p>
    <select name="Form1">
      <option onpick="">Link</option>
      <option onpick="#card1">OK</option>
    </select>
  </p>
</card>

<card id="card1">
  <p mode="wrap">
    <input name="TextBox1" />
  </p>
</card>
				
Click OK, and then navigate to the second card to see the TextBox.

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:MajorLast Reviewed:8/6/2002
Keywords:kbDeviceSpecific kbDSupport kbEmulation kbprb kbWMLDevice KB311049