-----------------------------------------------------------
New Message on BDOTNET
-----------------------------------------------------------
From: pawanns
Message 4 in Discussion
if you have vs.net 2003 enterprise version thats enough
............otherwise download mobile sdk kit..............there nothing
much diff. between mobile appln and webform.........it also uses same
controls only thing prefix will mobile:textbox etc...........
function is same like webform but u can have multiple form tags to activate
a form u can give like this.........
i 'm giving a small example code for mobile appln..........
this is MobileWebForm2.aspx
<%@ Page language="c#" Codebehind="MobileWebForm2.aspx.cs"
Inherits="CSharpMobileApp.MobileWebForm2" AutoEventWireup="false" %>
<%@ Register TagPrefix="mobile" Namespace="System.Web.UI.MobileControls"
Assembly="System.Web.Mobile" %>
<HEAD>
<meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">
<meta name="CODE_LANGUAGE" content="C#">
<meta name="vs_targetSchema"
content="http://schemas.microsoft.com/Mobile/Page">
</HEAD>
<body Xmlns:mobile="http://schemas.microsoft.com/Mobile/WebForm">
<mobile:Form id="Form1" runat="server">
<mobile:Label id="Label1" runat="server">What is your
name?</mobile:Label>
<mobile:TextBox id="NameEdit" runat="server"></mobile:TextBox>
<mobile:Command id="cmdGo" runat="server">Go!</mobile:Command>
</mobile:Form>
<mobile:Form id="SecondForm" runat="server">
<mobile:Label id="lblGreeting" runat="server"></mobile:Label>
</mobile:Form>
</body>
codebehind file ......MobileWebForm2.aspx.cs
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.Mobile;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.MobileControls;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
namespace CSharpMobileApp
{
/// <summary>
/// Summary description for MobileWebForm2.
/// </summary>
public class MobileWebForm2 : System.Web.UI.MobileControls.MobilePage
{
protected System.Web.UI.MobileControls.Label Label1;
protected System.Web.UI.MobileControls.TextBox NameEdit;
protected System.Web.UI.MobileControls.Command cmdGo;
protected System.Web.UI.MobileControls.Label lblGreeting;
protected System.Web.UI.MobileControls.Form Form1;
protected System.Web.UI.MobileControls.Form SecondForm;
private string greetingText;
private void Page_Load(object sender, System.EventArgs e)
{
// Put user code to initialize the page here
}
#region Web Form Designer generated code
override protected void OnInit(EventArgs e)
{
//
// CODEGEN: This call is required by the ASP.NET Web Form
Designer.
//
InitializeComponent();
base.OnInit(e);
}
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.cmdGo.Click += new System.EventHandler(this.cmdGo_Click);
this.SecondForm.Activate += new
System.EventHandler(this.SecondForm_Activate);
this.Load += new System.EventHandler(this.Page_Load);
}
#endregion
private void cmdGo_Click(object sender, System.EventArgs e)
{
greetingText = string.Format("Hello, {0}!", NameEdit.Text);
ActiveForm = SecondForm;
}
private void SecondForm_Activate(object sender, System.EventArgs e)
{
lblGreeting.Text = Server.HtmlEncode(greetingText);
}
}
}
regards,
pawan :)
_________________________________________________________________
Marriage? Join BharatMatrimony.com for free.
http://www.bharatmatrimony.com/cgi-bin/bmclicks1.cgi?74
-----------------------------------------------------------
To stop getting this e-mail, or change how often it arrives, go to your E-mail
Settings.
http://groups.msn.com/bdotnet/_emailsettings.msnw
Need help? If you've forgotten your password, please go to Passport Member Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help
For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact
If you do not want to receive future e-mail from this MSN group, or if you received
this message by mistake, please click the "Remove" link below. On the pre-addressed
e-mail message that opens, simply click "Send". Your e-mail address will be deleted
from this group's mailing list.
mailto:[EMAIL PROTECTED]