views:

30

answers:

0

i have a datalist with radio button..i can read id of selected item thru radio button in hiddenfield..is there a way to do it without postback or asyncpostback ????

   <asp:UpdatePanel ID="UpdatePanel9" runat="server" >
                <ContentTemplate>

<asp:DataList ID="DataList1" runat="server" RepeatColumns = "7"  
                        CssClass="datalist1"  OnItemDataBound="SOMENAMEItemBound"
                CellSpacing="-1" onselectedindexchanged="DataList1_SelectedIndexChanged" 
                        Width="550px" CellPadding="4" RepeatDirection="Horizontal">

                <ItemTemplate>

                <table cellpadding = "1px" cellspacing = "0" class="dlTable">
                <tr>
                <td align="center"  style="padding:15px">
                <a href="<%#Eval("FilePath")%>" target="_blank"><asp:Image ID="Image1" runat="server" CssClass="imu" ImageUrl = '<%# Eval("FilePath")%>' 
                Width = "80px" Height = "80px" style ="cursor:pointer" />
                </td>            
                </tr>
                <tr >
                <td align="center" > 
                    <asp:UpdatePanel ID="UpdatePanel3" runat="server">
                    <Triggers>
                   <asp:PostBackTrigger ControlID="rdb" />
                    </Triggers>
                          <ContentTemplate>          
                <asp:RadioButton ID="rdb" runat="server"  OnCheckedChanged="rdb_click" AutoPostBack="true"  CssClass="radio" /> 

                 </ContentTemplate> 
                </asp:UpdatePanel>

                <asp:HiddenField ID="HiddenField1" runat="server" Value = '<%#Eval("ID")%>' /> 
                </td>
                </tr>                     
                </table>

 </ItemTemplate> 

</asp:DataList>

</ContentTemplate>
         </asp:UpdatePanel>