[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

Re: Reg. SelectionList Control

CodeJockey

1/10/2002 4:11:00 PM

I'm not sure if this is your problem, but you will never pick up the first
item in the SelectionList if you put the assignment in the
SelectedIndexChanged event handler (the index defaults to the first item,
which doesn't change if you select the first item). Add a Command button and
move the assignment into the ButtonClicked event handler code.


"Prabakaran" <News_Praba@hotmail.com> wrote in message
news:eiPRGkYmBHA.2356@tkmsftngp02...
> Dear Friends,
>
> I am using CodeBehind concept for Mobile dotNET development.
> The OnSelectedIndexChanged event in SelectionList control is not fired.
> Why ?
>
> -Prabakaran.
>
>
> Here, I am posting the code that I used.
>
> The below is the code in Test.Aspx page
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> <%@ Register TagPrefix="mobile" Namespace="System.Web.UI.MobileControls"
> Assembly="System.Web.Mobile" %>
> <%@ Page language="c#" Codebehind="Test.aspx.cs"
> Inherits="MobileDerivati.Test" AutoEventWireup="false" %>
> <meta name="GENERATOR" content="Microsoft Visual Studio 7.0">
> <meta name="CODE_LANGUAGE" content="C#">
> <meta name="vs_targetSchema" content="Mobile Web Page">
> <body xmlns:mobile="Mobile Web Form Controls">
> <mobile:Form id="Form1" runat="server">
> <mobile:SelectionList id="SelectionList1" runat="server">
> <Item Value="0" Text="Test"></Item>
> <Item Value="1" Text="Test1"></Item>
> <Item Value="2" Text="Test2"></Item>
> </mobile:SelectionList>
> <mobile:Label id="Label1" runat="server">Label</mobile:Label>
> </mobile:Form>
> </body>
>
> The below is the code in Test.Aspx.cs
> ~~~~~~~~~~~~~~~~~~~~~~~~~~
> private void SelectionList1_SelectedIndexChanged(object sender,
> System.EventArgs e)
> {
> Label1.Text = SelectionList1.Selection.Text;
> }
>
> If you have a working code, then pl. send it to me.
>
> - Prabakaran
>
> "Andres Sanabria" <AndresSONLINE@Microsoft.com> wrote in message
> news:yhNuNZLmBHA.1572@cpmsftngxa07...
> > It should fire.. Could you post the code ??
> >
> > This posting is provided "AS IS" with no warranties, and confers no
> rights.
> > You assume all risk for your use. © 2001 Microsoft Corporation. All
rights
> > reserved.
>
>
>
>


1 Answer

(Jeremy Bostron (MS))

1/12/2002 12:57:00 AM

0