SelectionList woe

C

Ckwop

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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,763
Messages
2,569,563
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top