File Info on Mobile

Description

So here I am. Back after a fantabulous home trip. From there I gained a lot, talked to people about what they expect from their Mobile and the response was real good and positive. People are really excited and want to go on running up with the technology.

From now on, we will work on a Mobile Site as my salute to that enthusiasm. We will try to add all end user functionality one by one to that Mobile Site.

Anyway Today here is an Example Accessing the information in a File to be given to Mobile user.

Source Code:

// Source Code starts
<%@ Register TagPrefix="Mobile"Namespace="System.Web.UI.MobileControls
"Assembly="System.Web.Mobile"%>
<%@ Page Inherits="System.Web.UI.MobileControls.MobilePage"Language
="CS" %>
<script runat="server" language="C#">
protected void Page_Load(Object sender, EventArgs e)
{
String str="E:/ASPXSite/log.txt";
StreamReader reader=File.OpenText(str);
string output="";
string output1="";
while((output=reader.ReadLine()) !=null)
{
output1 = output1 + output;
}
reader.Close();
Label1.Text = output1;
}
</scripts>
<mobile:Form id=Form1 runat="server">
<mobile:Label id=Label1 runat="server"/>
</mobile:Form>
// Source Code End

So Friends get ready to make your presence in air.


Similar Articles