Form not posting correctly on cellphone

Discussion in 'ASP .Net Mobile' started by Ronny, Nov 20, 2007.

  1. Ronny

    Ronny Guest

    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/xhtml" >
    <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
    Ronny, Nov 20, 2007
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Visual Systems AB \(Martin Arvidsson\)

    Q: Special server for running Cellphone apps?

    Visual Systems AB \(Martin Arvidsson\), Nov 16, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    339
    Juan T. Llibre
    Nov 16, 2005
  2. dev
    Replies:
    0
    Views:
    387
  3. Replies:
    1
    Views:
    341
  4. Darryl Pierce

    Re: Cellphone addressing

    Darryl Pierce, Aug 22, 2005, in forum: Java
    Replies:
    1
    Views:
    332
  5. Tony
    Replies:
    2
    Views:
    357
    tonyha
    Aug 20, 2006
Loading...

Share This Page