Click here to Skip to main content
15,886,026 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have used a textbox with a popup control extender and a panel with a checkboxlist
when ever i click on the checkbox the values are stored in table but i can't view that values on my textbox
code as follows:
ASP.NET
<asp:TextBox ID="txtCombo" runat="server" ReadOnly="true" >  
           <cc1:PopupControlExtender ID="PopupControlExtender1"  runat="server" 
               TargetControlID="txtCombo" Position="Bottom" 
           PopupControlID="panel3" >

and my panel with checkbox is as follows:
ASP.NET
<asp:Panel ID="panel3"  runat="server" ScrollBars="Vertical" BorderWidth="1" Width="140"  BackColor="AliceBlue"  BorderColor="Azure">
    <asp:CheckBoxList ID="chkList" runat="server"  CssClass="style6" Width="124" Height="15"  OnSelectedIndexChanged="chkList_SelectedIndexChanged" >
    <asp:ListItem>1
    <asp:ListItem>2
    <asp:ListItem>3
    <asp:ListItem>4
    <asp:ListItem>5
    <asp:ListItem>6
    <asp:ListItem>7

Kindly help me out where is my error exactly
Posted
Updated 19-Oct-11 1:30am
v2
Comments
Syed Salman Raza Zaidi 19-Oct-11 7:37am    
can you share the code of chkList_SelectedIndexChanged

Your html doesn't look write so have a look at this W3 Schools Checkboxlist Demo[^]
 
Share this answer
 
might i have not paste by checkboxlist properly but the rest is as it is
kindly help me out why the list of my checkbox is added to the table but the selection is not display on the textbox
 
Share this answer
 
your controlID for the table needs to be the chkList

XML
<asp:TextBox ID="txtCombo" runat="server" ReadOnly="true" ControlID="chkList" >
           <cc1:PopupControlExtender ID="PopupControlExtender1"  runat="server"
               TargetControlID="txtBox" Position="Bottom"
           PopupControlID="panel3" >


the textbox needs to be controlled by the selected value of the checklist

i hope this helps and i have interpreted the question correctly
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900