Presentation is loading. Please wait.

Presentation is loading. Please wait.

CIS 451: ASP Components Dr. Ralph D. Westfall February, 2009.

Similar presentations


Presentation on theme: "CIS 451: ASP Components Dr. Ralph D. Westfall February, 2009."— Presentation transcript:

1 CIS 451: ASP Components Dr. Ralph D. Westfall February, 2009

2 Component Definition Component = prepackaged software object high quality, with features that are often useful commonly used items such as Buttons and TextBoxes, etc. are components

3 Component Sources Microsoft provides components with Visual Studio and VWDX in the ToolBox 3rd party vendors and open sourcevendors and open source create yourself book on creating components book

4 ToolBox Components Standard AdRotator - rotates "banner ads" Calendar – for showing year, month etc. on a page FileUpload – for submitting files Ajax Extensions for integrating client side JavaScript into ASP.NET applications

5 Example: Ad Rotator rotating "banner ads" is a common E-commerce function showing different ads instead of same one payment based on how often ad is shown frequency is based on input factors can show some more often e.g. ad A 80% of time ad B 20% of time

6 AdRotator: Tutorial, TutorialTutorial create ASP.NET web site right click Project Name, New Folder> rename it to Images find 3 images (or create) Image>Attributes: Width 190, Height 50 add content that looks like advertisement

7 Put AdRotator on Form drag/drop AdRotator from Standard section of Toolbox onto form Layout>Position>Auto-position Options>Absolutely positioned>OK drag AdRotator to top center could resize it to size of images (190 x 50)

8 Ad Rotator Parameters key ones can be set in [file].xml file links to images link to advertiser alt text relative frequency # can set some in Properties window also colors, borders, height, width, etc.

9 Configure Ad Content create an XML file right-click App_Data folder in Solution Explorer>Add new Item>XML File: [file name].xml>Add double-click XML file name to edit it

10 Configure Ad Content - 2 paste content from tutorial into XML filetutorial change the values for ImageURLs to paths of images (~/images/[image file name]) may modify other XML content items add elements to give relative frequencies

11 Configuration Data Source click smart tag>New data source>XML file>OK>Data File>Browse>select>OK>OK Adding hyperlink content via a new XML tag ASP.NET AdRotator - Basic and Extending and/or could also use to add text to a labelcould also use to add text to a label

12 Exercise create a page, add an AdRotator to it create/find images, configure xml file estimate relative frequencies of each one of three ads use refresh button to reload, and count how many times each ad appears try to tell if there is any pattern


Download ppt "CIS 451: ASP Components Dr. Ralph D. Westfall February, 2009."

Similar presentations


Ads by Google