1 / 12

CIS 451: ASP Components

CIS 451: ASP Components. Dr. Ralph D. Westfall February, 2009. 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. Component Sources.

Download Presentation

CIS 451: ASP Components

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

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 source • create yourself • book on creating components

  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, Tutorial • 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 <ImageUrl> • link to advertiser <NavigateUrl> • alt text <AlternateText> • relative frequency # <Impressions> • 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 file • change the values for ImageURLs to paths of images (~/images/[image file name]) • may modify other XML content items • add <Impressions> 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 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

More Related