Database Reference
In-Depth Information
catch (Exception ex)
{
Response.Write(ex.Message.ToString());
}
//Populate Repeater control with data
RepData.DataSource = dt;
RepData.DataBind();
}
6. Save the project and build the code by pressing Ctrl+Shift+B. It should build
successfully.
7. Because you added the data access code, you need to enable the Repeater
control to access this data. To do so, you need to tweak the HTML of
WebDataForm.
8. Close WebDataForm.aspx.cs if open. Go to Solution Explorer, right-click
WebDataForm, and select View Markup; you should see the HTML of
WebDataForm.aspx , as shown in Figure 16-10.
Figure 16-10. Markup view of WebDataForm
9. Modify the <body> HTML code segment to look like Listing 16-3.
 
Search WWH ::




Custom Search