[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

how to add event to selection list while creating it dynamically

swapnil

9/10/2008 2:20:00 PM

hello friends i am trying to find solution for this problem if u know
something then please tell

i am creating web application that runs on black berry.

here i need to create selection list which has three radio buttons in it.

but these are created dynamically. and i want to add event
"onselectedindexchanged" for this list.

so how can i add this event when i am creating it dynamically.

for static creation the code is of this kind
---------------------------------------------------------------
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="TestSelectionEvent.
aspx.cs" Inherits="TestSelectionEvent" %>
<%@ Register TagPrefix="mobile" Namespace="System.Web.UI.MobileControls"
Assembly="System.Web.Mobile" %>

<html >
<head>
<meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1"/>
<meta name="CODE_LANGUAGE" content="C#"/>
</head>
<script runat="server">

void mycall(Object sender, EventArgs e)
{
Response.Write("aaaa");
}

</script>
<body>
<mobile:Form id="Form1" runat="server">
<mobile:Panel ID="p1" Runat="server">
<mobile:DeviceSpecific ID="DeviceSpecific1" Runat="server">
<Choice Filter="supportsJavaScript">
<ContentTemplate>
<asp:RadioButtonList ID="SelectionList1" runat="server"
OnSelectedIndexChanged="SelectionList1_SelectedIndexChanged"
AutoPostBack="true" >
<asp:ListItem>Yes</asp:ListItem>
<asp:ListItem>No</asp:ListItem>
</asp:RadioButtonList>

</ContentTemplate>
</Choice>
<Choice Filter="supportsJavaScript">
<ContentTemplate>
<mobile:SelectionList ID="SelectionList1" Runat="server"
OnSelectedIndexChanged="SelectionList1_SelectedIndexChanged">
<Item Text="Yes" Value="Yes" />
<Item Text="No" Value="No" />
</mobile:SelectionList>

</ContentTemplate>
</Choice>
</mobile:DeviceSpecific>
</mobile:Panel>
</mobile:Form>

</body>
</html>
------------------------------------------------------------------------------
-------------------------
here selection list is created in design view i.e. statically.

but how can i do same when selection list is created dynamically

if any one know please help me........
thank you.