I still can't display the checkboxlist but the alert is listed all the
items.   Please help.  And here is my codes again.
        <body onload="BindControls();">
                <form id="Form1" method="post" runat="server">
                        <P><input id="MyButton" onclick="FillTable();" 
type="button"
value="Get Data"></P>
                        <Div id="DisplayChkBoxList"></Div>
                        <P>
                                <TABLE id="MyTable" cellSpacing="1" 
cellPadding="1" width="300"
border="1">
                                        <TR>
                                                <TD></TD>
                                                <TD></TD>
                                                <TD></TD>
                                        </TR>
                                        <TR>
                                                <TD></TD>
                                                <TD></TD>
                                                <TD></TD>
                                        </TR>
                                        <TR>
                                                <TD></TD>
                                                <TD></TD>
                                                <TD></TD>
                                        </TR>
                                </TABLE>
                        </P>
                </form>
                <script language="javascript">

                                //BindControl
                function BindControls()
                {
                        FillCheckBoxList();
                }

                //FillCheckBoxList
                function FillCheckBoxList()
                {
                        
UsingAjax.GetCheckBoxListData(FillCheckBoxList_CallBack);
                }

                //checkboxlist
                function FillCheckBoxList_CallBack(response)
                {
                        var rows = response.value.Tables[0].Rows.length;
                var checkbox_list =
document.getElementById("DisplayChkBoxList");
                        for( var i = 0; i < rows; i++)
                        {
                        checkbox_list.InnerHtml += "<input type='checkbox'
id='Mychk' value=' " + response.value.Tables[0].Rows[i].CategoryName +
" ' >";
                                
alert(response.value.Tables[0].Rows[i].CategoryName);
                        }

                }
                
                
                
                                        


                </script>
        </body>


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Ajax.NET Professional" group.

To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]

For more options, visit this group at http://groups.google.com/group/ajaxpro

The latest downloads of Ajax.NET Professional can be found at 
http://www.ajaxpro.info
-~----------~----~----~----~------~----~------~--~---

Reply via email to