Mega Code Archive

 
Categories / ASP.Net Tutorial / Mobile
 

Set ActiveForm

<%@ Page  Inherits="System.Web.UI.MobileControls.MobilePage" Language="C#" %> <%@ Register TagPrefix="mobile" Namespace="System.Web.UI.MobileControls" Assembly="System.Web.Mobile" %> <script runat="server">     void Command1_Click(Object sender, EventArgs e) {         ActiveForm = Form1;     }          void Command2_Click(Object sender, EventArgs e) {         ActiveForm = Form2;     } </script> <mobile:Form id="Form1" runat="server">     <mobile:Label id="Label1" runat="server">This is Form1</mobile:Label>     <mobile:Link id="Link1" runat="server" NavigateUrl="#Form2">Go To Form2</mobile:Link>     <mobile:Link id="Link2" runat="server" NavigateUrl="#Form3">Go To Form3</mobile:Link> </mobile:Form> <mobile:Form id="Form2" runat="server">     <mobile:Label id="Label2" runat="server">This is Form2</mobile:Label>     <mobile:Link id="Link3" runat="server" NavigateUrl="#Form1">Go To Form1</mobile:Link>     <mobile:Link id="Link4" runat="server" NavigateUrl="#Form3">Go To Form3</mobile:Link> </mobile:Form> <mobile:Form id="Form3" runat="server">     <mobile:Label id="Label3" runat="server">This is Form3</mobile:Label>     <mobile:Command id="Command1" onclick="Command1_Click" runat="server">Go To Form1</mobile:Command>     <mobile:Command id="Command2" onclick="Command2_Click" runat="server">Go To Form2</mobile:Command> </mobile:Form>