|
|
|
|
|
|
|
Page Views :
|
4884
|
|
Downloads :
|
0
|
|
Rating :
|
Rate it
|
|
Level :
|
Intermediate
|
|
Description
The WAP (Wireless Application protocol) is the leading standard for information services on wireless terminals like digital mobile phones The WAP standard is based on Internet standards such as HTML, XML and TCP/IP. It consists of a WML language specification, a WMLScript specification, and a Wireless Telephony Application Interface (WTAI) specification.
Equation
WAP = WML (Wireless Mark-up Language) + JavaScript
This article presents developing mobile (Wireless) Web application using .NET and C#.
Using Visual Studio .NET, you will be able to develop Mobile Web applications easily. Microsoft has integrated the .NET Mobile Web SDK directly into the Visual Studio .NET environment and makes it easy to create Mobile Web applications.
Here is a simple mobile form feedback, which will store the data into the xml file. Instead of storing user feedbacks directly in to the database, just store into the xml file, this XML file will available for any Application .
User Input Format
Mobile Number : 982345612 User Name : venkatesh Email Address : venkatesh@vkpuram.com User Comments : Add more links in Entertainment. I can n't check my hotmails in our WAP site.
Output in XML
<? xml version="1.0" ?> <Feedback> <number>982345612<number> <name> venkatesh</name> <email> venkatesh@vkpuram.com </email> <comments> Add more links in Entertainment. I can n't check my hotmails in our WAP site </comments> </Feedback>
Source Code:
<%@ Page Inherits=" System.Web.UI.MobileControls.MobilePage"Language="cs" %> <%@ Register TagPrefix="mobile" Namespace="System.Web.UI.MobileControls" Assembly="System.Web.Mobile" %> <% @Import Namespace="System.Web.Mail" %> <% @Import Namespace="System.Xml" %> <script language="c#" runat="server"> //Writing into XML file //List of cities <mobile:Form runat="server" ID="Form1" NAME="Form1"> <mobile:Label runat="server" ID="Label1" NAME="Label1"> Select a City </mobile:Label> <mobile:List runat="server" id="Listcityvalue"OnItemCommand="List_ClickEventHandler" > <item Text="Auckland" Value="auckland" /> <item Text="Chennai" Value="chennai" /> <item Text="Hong Kong" Value="hongkong" /> <item Text="Mumbai" Value="mumbai" /> <item Text="Malaysia" Value="malaysia" /> <item Text="New Delhi" Value="newdelhi" /> <item Text="New York" Value="newyork" /> <item Text="Sydney" Value="sydney" /> <item Text="Singapore" Value="singapore" /> <item Text="Tokyo" Value="tokyo" /> <item Text="Washington" Value="washington" /> </mobile:List> </mobile:Form> <mobile:Form runat="server" id="SecondForm"> <mobile:Label runat="server" id="WelcomeMessage" /> </mobile:Form> <mobile:Form id="weather" runat = "server"> <mobile:Label runat="server" id="WeatherLabel"/> </mobile:Form> //Source Code Starts public void Button_OnClick(Object sender, EventArgs e) { string feed_backFileName = "c:\\feedback.xml"; XmlTextWriter feedbackWriter = null; feedbackWriter = new XmlTextWriter (feed_backFileName, null); feedbackWriter.Formatting = Formatting.Indented; feedbackWriter .Indentation= 6; feedbackWriter .Namespaces = false; feedbackWriter.WriteStartDocument(); feedbackWriter.WriteStartElement("", "Feedback", ""); feedbackWriter.WriteStartElement("", "number", ""); feedbackWriter.WriteString(Mnumber); feedbackWriter.WriteEndElement(); feedbackWriter.WriteStartElement("", "name", ""); feedbackWriter.WriteString("username"); feedbackWriter.WriteEndElement(); feedbackWriter.WriteStartElement("", "email", ""); feedbackWriter.WriteString("useremail"); feedbackWriter.WriteEndElement(); feedbackWriter.WriteStartElement("", "comments", ""); feedbackWriter.WriteString("usercomm"); feedbackWriter.WriteEndElement(); feedbackWriter.WriteEndElement(); feedbackWriter.Flush(); feedbackMessage.Text = "Thank you for your valuable feedback"; this.ActiveForm = SecondForm; } </script> //Getting User's Input <mobile:Form runat="server" ID="Form1" NAME="Form1"> <mobile:Label runat="server" ID="Label1" NAME="Label1"> Thank you for taking the time to help us to improve our WAP service </mobile:Label> <mobile:Label runat="server" ID="Label2" NAME="Label2"> Enter your mobile number </mobile:Label> <mobile:TextBox runat="server" id="Mnumber" /> <mobile:Label runat="server" ID="Label3" NAME="Label3"> Enter your name </mobile:Label> <mobile:TextBox runat="server" id="username" /> <mobile:Label runat="server" ID="Label4" NAME="Label4"> Enter your email address </mobile:Label> <mobile:TextBox runat="server" id="useremail" /> <mobile:Label runat="server" ID="Label5" NAME="Label5"> Enter your comments </mobile:Label> <mobile:TextBox runat="server" id="usercomm" /> // When User's Click Submit Button <mobile:Command runat="server" id="Button" OnClick="Button_OnClick" > Submit </mobile:Command> </mobile:Form> <mobile:Form runat="server" id="SecondForm"> <mobile:Label runat="server" id="feedbackMessage" /> </mobile:Form> //Source Code End
|
|
Comment Request!
Thank you for reading this post. Please post your feedback, question, or comments about this post
Here.
|
|
|
|
|
Login
to add your contents and source code to this article
|
|
|
|
|
|
|
|
|
|
|
|
Jayachandran Ramadurai
Jayachandran Ramadurai has been Developing different kinds of applications for Wireless Industry like WAP Portal & SMS services using JAVA and Microsoft Technologies.
|
|
|
|
|
|
|
|
|
C# Consulting is founded in 2002 by the founders of C# Corner. Unlike a traditional
consulting company, our consultants are well-known experts in .NET and many of them
are MVPs, authors, and trainers. We specialize in Microsoft .NET development and
utilize Agile Development and Extreme Programming practices to provide fast pace
quick turnaround results. Our software development model is a mix of Agile Development,
traditional SDLC, and Waterfall models.
|
|
Click here to learn more about C# Consulting. |
|
|
|
|
|
|
|
Introducing MaxV - one click. infinite control. Hyper-V Hosting from MaximumASP.
Finally – a virtual platform that delivers next-generation Windows Server 2008 Hyper-V virtualization technology from a managed hosting partner you can truly depend on. Visit www.maximumasp.com/max for a FREE 30 day trial. Hurry offer ends soon.
Climb aboard the MaxV platform and take advantage of High Availability, Intelligent Monitoring, Recurrent Backups, and Scalability – with no hassle or hidden fees.
As a managed hosting partner focused solely on Microsoft technologies since 2000, MaximumASP is uniquely qualified to provide the superior support that our business is built on. Unparalleled expertise with Microsoft technologies lead to working directly with Microsoft as first to offer IIS 7 and SQL 2008 betas in a hosted environment; partnering in the Go Live Program for Hyper-V; and product co-launches built on WS 2008 with Hyper-V technology.
|
Dynamic PDF
ceTE software specializes in components for dynamic PDF generation and manipulation. The DynamicPDF™ product line allows you to dynamically generate PDF documents, merge PDF documents and new content to existing PDF documents from within your applications.
|
Nevron Chart for .NET 2010.1 Now Available
The leading .NET charting control now features PDF, Flash and Silverlight export, visualization of large datasets and more. Deliver true charting functionality to your BI, Scorecard, Presentation or Scientific apps. Download evaluation now.
|
ASP.NET 4 Hosting
Get 2 Months Free of ASP.NET Hosting for Only $4.95/month! Receive FREE MS SQL and MySQL Databases Including ASP.NET 4/3.5, MVC 3.0, Silverlight 4, Windows 2008/IIS 7.0 Plus FREE IIS 7 Modules. Host UNLIMITED ASP.NET Web Sites – Click Here!
|
|
|
|
|
|
|
|
|
|
|
|
|