Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Csc342 - Web Technologies Kutztown University, Spring 2016 Assignment 3 Problem Specification – Master Page, Base Page, Themes, Navigation, Validation – due start of class on 3/29/16 Part I: Use master page, content pages, base page, and themes (Chap 6) 1. (6%) Create a new folder (MasterPages) add a new master page (my.master) with a code behind. In addition to ContentPlaceHolders in your my.master page, you will often include header, sidebar and footer sections. Utilize CSS and images to help you design and arrange the layout of your master page. 2. (12%) Create at least three different themes in the App_Themes folder (create this folder if it does not already exist). Your themes must appear substantially different; using color, images, and text to achieve this. 3. (10%) Add a DropDownList for the created themes as in the “TRY IT OUT” to your master page above. Your dropDownList must be in close proximity to your wizard control. The theme must be applied immediately upon each new selection. Name your cookie as “myTheme.” 4. (10%) Since theme can only be set in the PreInit event and it will be needed for all your future content pages, you will create a MyBasePage.cs under App_Code to handle this. 5. Create a new folder Assign3 under your site root. Then add a new web form “aboutYou.aspx”, with code behind and based it on my.master page. You can copy your Wizard control and code behind methods over from Assign 1, then update your new partial class in the code behind to inherit from MyBasePage, instead of from System.Web.UI.Page. Note: Creating a reusable page template for your MyBasePage class is not required for this assignment. Part II: Use SiteMapPath control for breadcrumb (Chap 7) 1. (8%) Under App_Data folder add a new Site Map file (named it nav.sitemap). Construct your SiteMapNodes structure to reflect all your completed assignments so far using your home page as your root node. Refer to screenshots below. Note that the url attribute in each siteMapNode element must point to a valid page in your web site. Add appropriate titles and meaningful descriptions for each siteMapNode element. 2. Add the following to your web.config so you can use SiteMapProvider="navSiteMap" in your SiteMapDataSource and SiteMapPath controls later. <system.web> … <siteMap> <providers> <add name="navSiteMap" type="System.Web.XmlSiteMapProvider" siteMapFile="~/App_Data/nav.sitemap"/> </providers> </siteMap> </system.web> 3. (12%) Add a breadcrumb to your my.master using SiteMapPath control and set SiteMapProvider="navSiteMap". Note that you can use OnItemDataBound method to make changes on the control before it renders. Part III: Objects and Validation (Chap 9) 1) In your local website add two new classes (see table below) in the App_Code folder. Class name UserObj ContactObj Properties (Maxlength) Name (30), Email (40), Gender(6), BirthDate, Sports (100 or more) Phone (15), Zip (10), Comments (200) All properties are of type string except for BirthDate which is DateTime type. You must use these objects to organize your form data in code behind. This is in preparation for future database usage. You will replace them with objects from the Entity Framework later. 2) (12%) The following are required fields (shown with red asterisks in the figures below, fig A & B) in each step: Name & E-mail in step 1 and Phone & Zip Code in step 2. You might need to apply RegularExpressionValidator on them. Limit comments text area to allow up to only 100 characters. 3) (10%) All validation controls must pass before the user can leave the current step and move to the next step. Put focus (add SetFocusOnError property of validation controls) on the appropriate field when validation fails. Validation must also be performed at the server. 4) (10%) Add documentation for your code. You must include an information section at the top of each (.aspx, .aspx.cs, .master, .cs) file. 5) (10%) Your User Interface must be user friendly and professional looking. All controls should be aligned properly and are in close proximity to each other. Include a link to go back to the home page of your website. Fig A Fig B Fig C To read more on regular expressions: http://msdn.microsoft.com/en-us/library/2k3te2cs(v=VS.100).aspx http://msdn.microsoft.com/en-us/library/ff650303.aspx Hand-In: Submit a zip folder containing AboutYou.aspx, AboutYou.aspx.cs, nav.master, nav.master.cs, MyBasePage.cs, nav.sitemap, and web.config to D2L dropbox before the start of class.