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
- Partial Class Default2
- Inherits System.Web.UI.MobileControls.MobilePage
- Protected Sub Command1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Command1.Click
- Dim cku As New HttpCookie("UserId", TextBox1.Text)
- Dim ckp As New HttpCookie("Password", TextBox2.Text)
- Response.Cookies.Add(cku)
- Response.Cookies.Add(ckp)
- Response.Redirect("Mails.aspx")
- End Sub
- Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
- If Not Request.Browser.IsMobileDevice Then
- Form1.Visible = False
- Form1.Dispose()
- Response.Write("Invalid Device")
- End If
- End Sub
- End Class
Expand|Select|Wrap|Line Numbers
- Partial Class Mails
- Inherits System.Web.UI.MobileControls.MobilePage
- Dim UserId As String
- Dim Password As String
- Protected Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Form1.Load
- UserId = Request.Cookies("UserId").Value
- Password = Request.Cookies("Password").Value
- Label1.Text = "Welcome " & UserId
- End Sub
- Protected Sub Command1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Command1.Click
- Dim mList As New ArrayList
- Dim Mailbox As New QMailClient.POP3Client("mail.gajjarsystems.com", UserId, Password)
- If Mailbox.Login() Then
- Try
- For i As Integer = 0 To Mailbox.GetMailList(True).Count - 1
- Dim Email As New QMailClient.EMail
- Dim subj As String = Mailbox.GetMailList(True)(i).subject()
- mList.Add(subj)
- Next
- Catch ex As Exception
- Response.Write(ex.Message)
- End Try
- End If
- End Sub
- End Class
Plz help me......