Databind CheckBoxList ASP.NET 2.0





-8
Date Submitted Fri. Mar. 10th, 2006 9:29 AM
Revision 1 of 1
Helper ses5909
Tags "ASP.NET 2.0" | C | VB.NET
Comments 2 comments
Databinding in asp.net 2.0 is takes very few lines of code.

<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="Data Source=servername;Initial Catalog=dbname;Integrated Security=True"                                ProviderName="System.Data.SqlClient" SelectCommand="SELECT [id], [description] FROM [notificationLists]">                            </asp:SqlDataSource>
                       
<asp:CheckBoxList ID="chkNotify" runat="server" SataSourceID="SqlDataSource1"                             DataTextField="description" DataValueField="id">                        </asp:CheckBoxList>
 

Sara Smith

www.ilovecode.com
Sara

ilovecode

Comments

Comments Repeat after me . . .
Mon. Oct. 9th, 2006 10:41 AM    Scripter sehrgut
Comments Not useful
Wed. Apr. 9th, 2008 1:07 PM    Newbie csandvig

Voting