471,120 Members | 1,321 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,120 software developers and data experts.

Problem in ASP.Net with Mobile Web Pages..

I have problem with a Mobile Web page in ASP.Net 2.0 Web Application..

First i made a 2 page site in normal ASP.Net Web Application that is having two pages one for login and another one for email list. this is simply fetching emails from my email account and displaying from and subjects to a list box That is working fine its on www.gajjarsystems.com/wm.

Now i just changed those two pages into Mobile Web Pages with their components and same coding (socket programming is in a class). When i run that application on computer its working fine. but when i run that from my cell phone then its showing fist page of login fine but when i submit login page its not working and giving an error "Something is wrong page could not be loaded" i tried many time but its not working.. i have tested from google wap proxy as well (http://google.com/gwt/n). its not working on there also. the funnything is the same thing if i open using Internet Explorer in my windows XP then it works fine.. its on www.gajjarsystems.com/wapmail

Here is what i did..

First Login Page :
Expand|Select|Wrap|Line Numbers
  1.  
  2. Partial Class Default2
  3.     Inherits System.Web.UI.MobileControls.MobilePage
  4.  
  5.     Protected Sub Command1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Command1.Click
  6.         Dim cku As New HttpCookie("UserId", TextBox1.Text)
  7.         Dim ckp As New HttpCookie("Password", TextBox2.Text)
  8.         Response.Cookies.Add(cku)
  9.         Response.Cookies.Add(ckp)
  10.         Response.Redirect("Mails.aspx")
  11.     End Sub
  12.  
  13.     Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
  14.         If Not Request.Browser.IsMobileDevice Then
  15.             Form1.Visible = False
  16.             Form1.Dispose()
  17.             Response.Write("Invalid Device")
  18.         End If
  19.     End Sub
  20. End Class
  21.  
  22.  
Second Mail List Page:
Expand|Select|Wrap|Line Numbers
  1.  
  2. Partial Class Mails
  3.     Inherits System.Web.UI.MobileControls.MobilePage
  4.     Dim UserId As String
  5.     Dim Password As String
  6.  
  7.     Protected Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Form1.Load
  8.         UserId = Request.Cookies("UserId").Value
  9.         Password = Request.Cookies("Password").Value
  10.         Label1.Text = "Welcome " & UserId
  11.     End Sub
  12.  
  13.     Protected Sub Command1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Command1.Click
  14.         Dim mList As New ArrayList
  15.         Dim Mailbox As New QMailClient.POP3Client("mail.gajjarsystems.com", UserId, Password)
  16.         If Mailbox.Login() Then
  17.             Try
  18.                 For i As Integer = 0 To Mailbox.GetMailList(True).Count - 1
  19.                     Dim Email As New QMailClient.EMail
  20.                     Dim subj As String = Mailbox.GetMailList(True)(i).subject()
  21.                     mList.Add(subj)
  22.                 Next
  23.             Catch ex As Exception
  24.                 Response.Write(ex.Message)
  25.             End Try
  26.         End If
  27.     End Sub
  28. End Class
  29.  
  30.  


Plz help me......
Mar 8 '08 #1
1 1413
idsanjeev
241 100+
Hi kaushalgajjar
you know your question about .net but question posted by you in ASP so please post your question in .net forum.
thanks
Mar 10 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

7 posts views Thread by Stefan Finzel | last post: by
reply views Thread by Wiktor Zychla | last post: by
4 posts views Thread by Sara | last post: by
5 posts views Thread by rn5a | last post: by
7 posts views Thread by cj2 | last post: by
pradeepjain
4 posts views Thread by pradeepjain | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.