locked
Mobile TextBox Empty String RRS feed

  • Question

  • User314752585 posted
    Hello all, i have a small ASP .NET Mobile Web Application which contains two forms. the first contains a text box and a linkt to the second form. the second contains a label and a link back to the first form. at activatoin of the second form the value of TextBox1.text should be written in the Lable.Text property. This all works just fine if i run it in IE but not in any Mobile Simulator i found ( -Openwave -Nokia -Microsoft mobile explorer ) In the simulators the TextBox1.Text property seems to stay empty. Here is my code; <%@ Import Namespace="TwinCAT.Ads" %> <%@ Import Namespace="System.IO" %> <%@ Register TagPrefix="mobile" Namespace="System.Web.UI.MobileControls" Assembly="System.Web.Mobile" %> <%@ Page Language="vb" AutoEventWireup="false" Codebehind="MobileWebForm1.aspx.vb" Inherits="MobileWebApplication1.MobileWebForm1" %> <HEAD> <script runat="server"> Protected Sub Form2_OnActivate( s as Object, e as System.EventArgs ) Label1.Text = TextBox1.Text End Sub </script> <meta content="Microsoft Visual Studio .NET 7.1" name="GENERATOR"> <meta content="Visual Basic .NET 7.1" name="CODE_LANGUAGE"> <meta content="http://schemas.microsoft.com/Mobile/Page" name="vs_targetSchema"> </HEAD> <body Xmlns:mobile="http://schemas.microsoft.com/Mobile/WebForm"> <mobile:form id="Form1" runat="server"> <mobile:TextBox id="TextBox1" runat="server"></mobile:TextBox> <mobile:Link id="Link3" runat="server" NavigateUrl="#Form2">Show value at other form </mobile:Link> </mobile:form> <mobile:Form id="Form2" runat="server" OnActivate="Form2_OnActivate"> <mobile:Label id="Label1" runat="server">Label</mobile:Label> <mobile:Link id="Link4" runat="server" NavigateUrl="#Form1">Return To Form1</mobile:Link> </mobile:Form>
    Friday, January 21, 2005 7:16 AM

All replies

  • User-153924892 posted
    I think the Mobile Quickstart Tutorial will solve your problems. Responding to Control Events Thomas
    Friday, January 21, 2005 1:21 PM
  • User314752585 posted
    Lots of thanks Thomas! It seems that i have to capture the .Text value befor activating the second form! As your solutin shows i have to do this in the OnClick event of a button. This first resolved into a nice error: "Error: Malformed server response" But i found a solution for this on a forum of Openwave! as i said, lots of thanks for your responce! Bas
    Monday, January 24, 2005 4:24 AM