| |
prk72
Posts: 2
Score: 0
Joined: 8/9/2007
Status: offline
|
I'm still trying to learn how to write VB script but truly am having a hard time grasping it. I was hoping someone could help me with the following: I've got a CheckBoxList that is populated via my database, how do write a script that will automatically check all the boxes? Thanks. Here is my code: <%@ Page Language="VB" MasterPageFile="~/MasterPage.master" Title="Untitled Page" %> <script runat="server"> </script> <asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"> <asp:CheckBoxList ID="CheckBoxList1" runat="server" DataSourceID="SqlDataSource1" DataTextField="Name" DataValueField="Name" AutoPostBack="True"></asp:CheckBoxList> <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>" SelectCommand="SELECT DISTINCT [Name] FROM [tblName]"></asp:SqlDataSource> </asp:Content>
|
|