Upload
leo-richardson
View
215
Download
2
Embed Size (px)
Citation preview
Web Server ControlsWeb Server ControlsMacDonald Ch. 5MacDonald Ch. 5
MIS 324Professor Sandvig
TodayToday
Benefits of Server ControlsBenefits of Server ControlsOverview of HTML-like controlsOverview of HTML-like controlsControls unique to ASP.NETControls unique to ASP.NETData-listing controlsData-listing controlsExampleExample
ASP.NET ControlsASP.NET Controls
Benefits of Server ControlsBenefits of Server Controls
Objects with many properties & methodsObjects with many properties & methods Events:Events:
onTextChangedonTextChanged onCheckedChangedonCheckedChanged onClick…onClick…
Data stored in viewstateData stored in viewstate Validation controlsValidation controls
Client & server validationClient & server validation
HTML-like controlsHTML-like controls
Correspond to HTML tags:Correspond to HTML tags:TextboxTextbox
textareatextareaButtonButtonCheckboxCheckboxRadiobuttonRadiobuttonDropDownDropDownImageImageHyperlinkHyperlinkLabelLabel
Other ControlsOther Controls
LinkButton controlLinkButton control Looks like hyperlinkLooks like hyperlink Acts like a button (postback)Acts like a button (postback)
Panel ControlPanel Control Use to hide/show groups of controlsUse to hide/show groups of controls
Visible propertyVisible property Can still access & change hidden control Can still access & change hidden control
propertiesproperties Use frequentlyUse frequently
DataListing ControlsDataListing Controls
Datalisting controlsDatalisting controls Typically fill from datasourceTypically fill from datasource
RadioButtonListRadioButtonListCheckBoxListCheckBoxListGridViewGridViewRepeaterRepeaterDetailsViewDetailsViewFormViewFormView
Example: Example: CheckBoxListControl.aspx (source)(source)
Discuss in Ch. 13 ADO.NETDiscuss in Ch. 13 ADO.NET
ExamplesExamples
Controls Used:Controls Used:Panel, textbox, button, dropdown list, Panel, textbox, button, dropdown list,
checkbox list, hyperlink, label, required field checkbox list, hyperlink, label, required field validator, custom validator validator, custom validator
Baker Snowboard: source, outputBaker Snowboard: source, output
Web Form SummaryWeb Form Summary
Web Server controls write HTMLWeb Server controls write HTML Benefits:Benefits:
ViewstateViewstate Programmatic accessProgrammatic access
PropertiesPropertiesEventsEventsMethodsMethods
Validation controlsValidation controls