1. Open Bloglist.aspx in Design view.
2. In the Content control type "Blog Members". Format this as
an H2 header.
3. From the Data section of the Toolbox, drag
a SqlDataSource control onto the page, placing it below the header.
In the SqlDataSource Tasks menu click Configure Data Source.
4. In the Configure Data Source wizard, for Choose Your Data
Connection, select GeekSpeak.mdf, and then click Next.
You should see the following, and then click Next.
5. For Configure Your Select Statement check MemberAccountName
column and Return only unique rows. Click Order By,
and then for Sort by select MemberAccountName.
Click OK. Verify that your dialog looks like the following, then
click Next and Finish. Finally, change the
SqlDataSource control's ID property to "membersSqlDataSource".
The connection string has been added to the root Web.config file and referenced
by your SqlDataSource control.
6. From the Toolbox drag a DataList control below
the SqlDataSource control. In the DataList Tasks
menu, for Choose Data Source, select membersSqlDataSource.
In the Properties window change the ID to "membersDataList".
Switch to Source view, and replace the existing content between
the <ItemTemplate> tags with the following:
<a href=Blog.aspx?un=<%# Eval("MemberAccountName") %>><%# Eval("MemberAccountName") %></a>
Powered By ASP.NET v2.0