CS 233S: Web Application Development II	Name:	
Assignment #5 Data Binding & Management	Date Due:	

In this fifth assignment, you will explore the tools available through ASP.NET that allow developers to create and manage various data store connections, data bound objects, and manipulate data programmatically.
Part A: Text Reading	100 points
1.	Read Chapters 7 and 8 in the textbook. Read all of the pages – you are responsible for the knowledge in each section, even if you are not required to complete the coding. Many of the examples and techniques shown will be used later on in additional coding examples or in your project site. Follow the VB or C# directions for:
•	Page 305, Listing 7-22: create the file shown, using chap7page1.aspx as the file name. Note that before creating the code you will need to add the Northwind.mdf file to the App_Data folder and create a connection, saved in the web.config file as AppConnectionString1, to the database. See Configuring a Data Connection on pages 277-180 for how to create the connection string in the web.config file.
•	Page 307, Listing 7-23: modify chap7page.aspx; add the RowDataBound event procedure shown
•	Page 308, Listing 7-24: modify chap7page1.aspx; add the EmptyDataText attribute shown.
•	Page 309, Listing 7-25: modify chap7page1.aspx as shown; use the Edit Templates option from the GridView smart tag as described on 308, then edit the code in source view as shown on 309-10.
•	Page 310, Listing 7-26: modify the chap7page1.aspx file; add the AllowSorting attribute.
•	Page 310, Listing 7-27: modify the chap7page1.aspx file; add the sorting event procedure.
•	Page 312. Listing 7-28: modify the chap7page1.aspx file; add the AllowPaging attribute.
•	Page 313, Listing 7-29: modify the chap7page1.aspx file; add PagerStyle and PagerSettings tags.
•	Page 314, Listing 7-30: modify the chap7page1.aspx file; add the NullDisplayText attribute.
•	Page 317. Listing 7-31: modify the chap7page1.aspx file; add the HyperLinkField either through the code or using the Add Field dialog box described just prior to this listing.
•	Page 319, Listing 7-33: modify the chap7page1.aspx file; add the TemplateField shown either through the code or using the Edit Template feature in Design view.
•	Page 319, Listing 7-34: modify the chap7page1.aspx file; add the data-binding expression shown.
•	Page 321, Listing 7-35 and -36: modify the chap7page1.aspx file; add the UpdateCommand attribute and the UpdateParameters shown in these two listings.
•	Page 322, Listing 7-38: modify the chap7page1.aspx file; add the CommandField control.
•	Page 322, Listing 7-39: modify the chap7page1.aspx file; add the DataKeyNames attribute.
•	Page 323, Listing 7-40: modify the chap7page1.aspx file; add the ReadOnly propery shown.
•	Page 324, Listing 7-41: modify the chap7page1.aspx file; add the RowUpdated event procedure shown.
•	Page 325, Listing 7-42: modify the chap7page1.aspx file; change the BoundField column for the Region to the Template field as shown.
•	Page 325, Listing 7-43: modify the chap7page1.aspx file; add the RowDataBound event procedure.
•	Page 327, Listing 7-44: modify the chap7page1.aspx file; add the RowUpdating event procedure.
•	Page 327, Listing 7-45: modify the chap7page1.aspx file; add the AutoGenerateDeleteButton attribute.
•	Page 328, Listing 7-46 and -47: modify the chap7page1.aspx file; add the DeleteCommand attribute and then the DeleteParameters child element.
•	Page 328, Listing 7-48: modify the chap7page1.aspx file; add the RowDeleted event procedure.
•	Page 331, Listing 7-51: save a copy of the chap7page1.aspx file as chap7page2.aspx and then modify the code as shown. Be sure to note the change in attributes in the opening asp:GridView control as well as the addition of the SelectedRowStyle and RowStyle child elements of the GridView control. Add the code necessary to create the DetailsView control and the additional SqlDataSouce control.
•	Page 335, Listing 7-53: modify the chap7page2.aspx file; add the DatakeyNames attribute.
•	Page 336, Listing 7-54 and -55: modify the chap7page2.aspx file; add the AutoGenerateInsertButton, InsertCommand, and InsertParameters shown.
•	Page 347, Listing 7-58: create a chap7page3.aspx file; the file will use the connection created in the first exercise. Note that although the book only shows the C# version of the page there is no difference for students completing the page in VB other than the language attribute in the page directive.
•	Page 388, Listing 8-18: create a chap8page1.aspx file
•	Page 390, Listing 8-19: modify the chap8page1.aspx file; add the RepeatLayout attribute.
•	Page 390, Listing 8-20: modify the chap8page1.aspx file; add the AlternatingItem and Separator templates.
•	Page 391, Listing 8-21: modify the chap8page1.aspx file; add the various style-related attributes and tags.
•	Page 393, Listing 8-22: modify the chap8page1.aspx file; add the RepeatColumn-related attributes.
•	Page 395, Listing 8-23: create a chap8page2.aspx file as shown.
•	Page 396, Listing 8-24: modify the chap8page2.aspx file; add the LayoutTemplate shown inside of the ListView control.
•	Page 398, Listing 8-25: modify the chap8page2.aspx file; add the ItemTemplate shown.
•	Page 398, Listing 8-26: modify the chap8page2.aspx file; add the EditItemTemplate shown.
•	Page 399, Listing 8-27: modify the chap8page2.aspx file; add the EmptyItemTemplate shown.
•	Page 399, Listing 8-28: modify the chap8page2.aspx file; add the InsertItemTemplate shown.
2.	Email or print the code view (including the code behind the page as needed) from:
•	
•	Chap7page1.aspx
•	Chap7page2.aspx
•	Chap8page1.aspx
•	Chap8page2.aspx

Part B: On Your Own	100 points
1.	Incorporate data into your project website in such a way that you demonstrates: 
a.	Your ability to create an Access or SQL data store that contains at least one table, with at least 3 fields. The table should contain at least 5 sample records. 
i.	The field names should all be appropriate one-word names that avoid reserved keyword use.
ii.	The field properties (data type, size, etc.) should be a good fit with the data within the field.
b.	Using your Access or SQL data store to display data via a rich control (e.g. GridView or Calendar)
c.	Using the same or a separate Access or SQL data store to display data via a template-based control (e.g. FormView or ListView or Repeater).
d.	Using an XML data store to populate…something. You could use an AdRotator control, or create an XML sitemap for use with a menu or treeview control, or your own custom XML file for whatever purpose is a best fit for your site
e.	Allow a site user to add a new record to any type of data store using the controls of your choice.
f.	Allow a site user to delete a record from any type of data store using the controls of your choice.
g.	Apply sufficient formatting and place the databound controls within enough context that the function and purpose of each page is clear. Be sure to provide good directions for filling out any forms.
2.	Zip your project folder, including the XML and either SQL or Access data stores and email.