Blue Theme Orange Theme Green Theme Red Theme
 
Team Foundation Server Hosting
Home | Forums | ASP.NET 2.0 Tutorials | Web Services | How Do I...? | Class Browser | WPF Quick Starts | Advertise with Us
 | Consulting  
Submit an Article Submit a Blog 
 Jump to
Skip Navigation Links
TechnologyExpand Technology
WebsiteExpand Website
6 Months Free & No Setup Fees ASP.NET Hosting!
Search :       Advanced Search »
Home » Mobile and Embedded » Mobile Page Unit of Mobile Site

Mobile Page Unit of Mobile Site

This is something like creating WAP Pages it is still as usual my basic starting So here i will be storing only some info but What it exactly is the same as if people heard of WAP Pages and many sites offer you to create your own WAP Pages similar to WebPages but limit it to the device size and strength.

Author Rank :
Page Views : 2603
Downloads : 0
Rating :
 Rate it
Level : Intermediate
   Print Read/Post comments Post a comment  Similar Articles  
   Email to a friend  Bookmark  Author's other articles  
 
6 Months Free & No Setup Fees ASP.NET Hosting!
Become a Sponsor
 Tag Cloud
 Latest Jobs
More ... 
 Latest Interview Questions
More ... 

Description

A lot of gap as I was busy last week and the best happening is the last weekend. One of my experiences I wanted to share was Installing IE 6.0. I installed IE 6.0 thought it supports XML and lot more big thoughts like this but the best part happening is every time I try to connect to msdnlibrary or try to open some aspx specific URL it throws error and the browser closes asking for sending the Report to the creators. Anyway tough time is over as now as I went back to IE 5.5. I don't know this was happening with me only or there are more victims of curiosity.

So here is we came to Mobile Page unit. What it is ? Ok This is something like creating WAP Pages it is still as usual my basic starting So here i will be storing only some info but What it exactly is the same as if people heard of WAPPages and many sites offer you to create your own WAP Pages similar to WebPages but limit it to the device size and strength.

I am looking for good chances to do all that here also and able to extend every unit.Let me know if somewhere those chances are growing.

Here we will use SQL Server as usual something new something different.

This unit is divided in two parts

  • Mobile Page Entry  :The user will create and save the Page
  • Mobile Page View   :The user can view his Page after providing his Page Name

 In this article we will see first Part where user create  Mobile Page.Save the same also in MobileSite directory.

Check out the Code

Source Code:

// Source Code starts
<%@ Page Inherits="System.Web.UI.MobileControls.MobilePage" Language="C#"Debug="true" %>
<%@ Register TagPrefix="mobile"
Namespace="System.Web.UI.MobileControls"
Assembly="System.Web.Mobile" %>
<%@ Import
Namespace="System" %>
<%@ Import
Namespace="System.Data"%>
<%@ Import
Namespace="System.Data.SqlClient" %>
<script runat="server" language="C#">
public string strAccessConn ="server=localhost;uid=sa;pwd=;database=practice";
public void Page_Save(Object sender, EventArgs e)
{
if(Page.IsValid)
{
SqlConnection myConn =
new SqlConnection(strAccessConn);
SqlCommand myCommand =
new SqlCommand("Insert into Page_Unit
Page_Name,Page_Data) values
'"+pagename.Text+"','"+pagecontent.Text+"')",myConn);
myConn.Open();
myCommand.ExecuteNonQuery();
ActiveForm =Form2;
}
}
</script>
<mobile:Form id = "Form1" runat="server">
<
mobile:Label runat="server" ID="Label1">Page Name</mobile:Label>
<
mobile:TextBox runat="server" id="pagename"/>
<
mobile:Label runat="server" ID="Label2">Page Content</mobile:Label>
<
mobile:TextBox runat="server" id="pagecontent"/>
<
mobile:Command runat="server" OnClick="Page_Save" Text="Go!"
ID="Command1"/>
</
mobile:Form>
<
mobile:Form runat="server" id="Form2"><mobile:Label id ="status" runat="server">
Your Page is successfully created
</mobile:Label>
<
mobile:Link runat="server" NavigateURL="MobilePageview.aspx" ID="Link1">
View your Page
</mobile:Link>
</
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
 [Top] Rate this article
 
 About the author
 
Shivani
Shivani is Electronics graduate from REC Bhopal, INDIA. After Electronics she jumped to software development and has been dealing with WAP and Java technologies. Currently she is working with C# and ASP.NET for a transaction Portal.
Looking for C# Consulting?
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!
 
 Post a Feedback, Comment, or Question about this article
Subject:
Comment:
Team Foundation Server Hosting
Become a Sponsor
 Comments
6 Months Free & No Setup Fees ASP.NET Hosting!
 © 2012  contents copyright of their authors. Rest everything copyright Mindcracker. All rights reserved.