[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.aspnet.mobile

Form not posting correctly on cellphone

Ronny

11/20/2007 12:49:00 PM

Hi everyone!

I am currently programming a larger website using MobileControls. When doing
the livetests (on a public server), I wanted to protect the pages using some
kind of password and designed a simple login-page where the user simply
entered a hardcoded password.

This worked fine on most cellphones until I ran across the SonyEricsson
p-series, when I entered the password and pressed the button no event was
triggered at all.

After some browsing I found out about a bug when there is only one textfield
on the page, so I added another one to see if it was this that caused the
problem. However this was not the case.

The problemer here is that the phone can browse other pages and can transmit
data via post forms there (and yes these pages are programmed in
MobileControls too and are very similar to mine, I was given access to one of
these pages to examine the error, that is why I know this).

This leads me to believe that there is something wrong with my web.config,
but I cant find what, and I have tried several alternatives, but nothing
changes the fact that the phone does not transmit the data.

I am posting the code for the page with one textfield below:

aspx:
#########################################
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs"
Inherits="_Default" %>
<%@ Register TagPrefix="mobile" Namespace="System.Web.UI.MobileControls"
Assembly="System.Web.Mobile" %>

<html xmlns="http://www.w3.org/1999/x... >
<body>
<mobile:Form id="Form1" runat="server">
<mobile:Label ID="LabelError" Runat="server" Visible="False">Login
Error!</mobile:Label>
<mobile:TextBox ID="TextPassword" Runat="server">
</mobile:TextBox>
<mobile:Command ID="CommandLogin" Runat="server"
OnClick="CommandLogin_Click">Log in!</mobile:Command>

</mobile:Form>
</body>
</html>
#########################################
c#:
#########################################
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.Mobile;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.MobileControls;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;

public partial class _Default : System.Web.UI.MobileControls.MobilePage
{
protected void Page_Load(object sender, EventArgs e)
{

}
protected void CommandLogin_Click(object sender, EventArgs e)
{
LabelError.Visible = true;
LabelError.Text = "Show me";
}
}

#########################################

The above code should make the LabelError display something when the button
is clicked. But it does not.

Any input here would be really helpful!

Best regards
Ronny