SelectionList woe

Discussion in 'ASP .Net Mobile' started by Ckwop, May 9, 2005.

  1. Ckwop

    Ckwop Guest

    Dear All,

    I'm trying to read back data from a selection list control when the
    output rendering is in WML. I've turned ViewState and SessionState off
    using the revelent Page directives.

    The problem is that when I do Request.Params["moochew"] (where moochew
    is the name of the control) I simply get string.Empty returned and not
    null as I'd expect if the whole thing was failing completly.

    Source Code:

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
    <HTML>
    <body Xmlns:mobile="http://schemas.microsoft.com/Mobile/WebForm">
    <mobile:form id="Step1" title="Complete Order" runat="server">
    <mobile:panel id="controlsPanel1" runat="server">
    <mobile:SelectionList Runat="server" ID="fortran"
    BreakAfter="True">
    <Item Text="1" Value="1" />
    <Item Text="2" Value="2" />
    </mobile:SelectionList>
    </mobile:panel>
    <mobile:Command id="cmdNext1" runat="server">Next ></mobile:Command>
    </mobile:form>
    </body>
    </HTML>


    CS codebehind:

    using System;
    using System.Collections;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Web;
    using System.Web.SessionState;
    using System.Web.UI;
    using System.Web.UI.MobileControls;

    namespace MppGlobal.WebSite.Wap
    {
    /// <summary>
    /// Summary description for Test.
    /// </summary>
    public class Test : MppGlobal.Web.Mobile.MobilePage
    {
    protected System.Web.UI.MobileControls.Panel controlsPanel1;
    protected System.Web.UI.MobileControls.Command cmdNext1;
    protected System.Web.UI.MobileControls.Form Step1;

    protected System.Web.UI.MobileControls.SelectionList fortran;

    private void Page_Load(object sender, System.EventArgs e)
    {

    // Test it actually works.
    int farmer = Convert.ToInt32(Request.Params["fortran"]);

    }

    #region Web Form Designer generated code
    override protected void OnInit(EventArgs e)
    {
    //
    // CODEGEN: This call is required by the ASP.NET Web Form Designer.
    //
    InitializeComponent();
    base.OnInit(e);
    }

    /// <summary>
    /// Required method for Designer support - do not modify
    /// the contents of this method with the code editor.
    /// </summary>
    private void InitializeComponent()
    {
    this.Load += new System.EventHandler(this.Page_Load);
    this.cmdNext1.Click+=new EventHandler(cmdNext1_Click);
    }
    #endregion

    private void cmdNext1_Click(object sender, EventArgs e)
    {

    }
    }
    }


    Any thoughts or suggestions?

    Kind Regards,

    Simon.
     
    Ckwop, May 9, 2005
    #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. Replies:
    3
    Views:
    525
    Paul Clement
    Sep 12, 2005
  2. GR33DY
    Replies:
    0
    Views:
    585
    GR33DY
    Jun 24, 2004
  3. GR33DY
    Replies:
    3
    Views:
    877
  4. Alexander Schmolck

    re.sub replacement text \-escapes woe

    Alexander Schmolck, Feb 13, 2004, in forum: Python
    Replies:
    4
    Views:
    375
    Alexander Schmolck
    Feb 14, 2004
  5. import woe

    , May 19, 2006, in forum: Python
    Replies:
    4
    Views:
    353
    Terry Hancock
    May 19, 2006
Loading...

Share This Page