Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 CS 3870/CS 5870: Note 18 SiteMap Prog8. Test 2 50 Points Thursday, Nov 12 2:00 PM – 4:00 PM Lab 206 2.

Similar presentations


Presentation on theme: "1 CS 3870/CS 5870: Note 18 SiteMap Prog8. Test 2 50 Points Thursday, Nov 12 2:00 PM – 4:00 PM Lab 206 2."— Presentation transcript:

1 1 CS 3870/CS 5870: Note 18 SiteMap Prog8

2 Test 2 50 Points Thursday, Nov 12 2:00 PM – 4:00 PM Lab 206 2

3 Prog8MasterPage TreeView –DataSourceID –Data Source Type Site Map XML File Use Site Map 3

4 Site Map XML File Web.sitemap Organize the pages in the site hierarchically Must be located in the application root directory Automatically picked up by the default site- map provider SiteMapDataSource 4

5 Creating File Web.sitemap Right click the application root Add Add New Site Map It could be created in a sub-folder, but won’t be recognized 5

6 Initial Web.sitemap 6

7 Web.sitemap Contains only one siteMapNode element The root node can contain any number of child siteMapNode elements The child notes can have their child notes Note Properies –URL: can be empty, but no duplicate –Title –Description 7

8 Page Default.aspx Based on Prog8MasterPage One message centered on the page Use the TreeView to navigate to the pages you want to see. 8

9 Page Score.aspx Select assignment Enter score for the assignment 9

10 Table Assignment AssignmentID : varchar(5), primary key, update not allowed MaximumPoints: tinyint DueTime: smalldatetime Description: varchar(50), allow nulls BonusPoints: tinyint 10

11 DropDownList Properties –DataSourceID –DataTextField : AssignmentID –DataValueField: AssignmentID Display one field of all records –AssignmentID –No other navigation controls 11

12 All Record Fields DetailsView Any other controls Must use the DropDownList to navigate DetailsView –PageIndex 12

13 Page Grade.aspx Show all selected assignments with scores Calculate the percentage and grade for each assignment Calculate the course percentage and grade based on all selected assignments 13

14 14 Web User Controls ScoreToGrade.ascx Similar to ShoppingItem Test3 will be on Web User Control (and others)

15 Web User Controls Private data Public properties Public methods Public Events Register LoadControl 15

16 16 Class ScoreAndGrade CheckInput –Page Score.aspx –User Control ScoreToGrade.ascx ComputePercentageAndGrade –Page Grade.aspx –User Control ScoreToGrade.ascx Should be Shared in VB

17 17 Class ScoreAndGrade Declare constants No Magic numbers!

18 ASP.NET and AJAX Processing of dynamic pages –Generate entire page on each request –Extra processing –Extra network load AJAX makes dynamic pages the same as Windows forms –Update only the controls that changed 18

19 Bonus Points Five Bonus Points –Page Score.aspx –Browser back/Forward buttons work with AJAX Five Bonus Points –Page Grade.aspx –the selected assignments with the scores using the Web user control are always displayed in the center of page Grade.aspx 19


Download ppt "1 CS 3870/CS 5870: Note 18 SiteMap Prog8. Test 2 50 Points Thursday, Nov 12 2:00 PM – 4:00 PM Lab 206 2."

Similar presentations


Ads by Google