90 likes | 286 Views
Web Server Controls MacDonald Ch. 5. MIS 324 Professor Sandvig. Today. Benefits of Server Controls Overview of HTML-like controls Controls unique to ASP.NET Data-listing controls Example. ASP.NET Controls. Benefits of Server Controls. Objects with many properties & methods Events:
E N D
Web Server ControlsMacDonald Ch. 5 MIS 324 Professor Sandvig
Today • Benefits of Server Controls • Overview of HTML-like controls • Controls unique to ASP.NET • Data-listing controls • Example
Benefits of Server Controls • Objects with many properties & methods • Events: • onTextChanged • onCheckedChanged • onClick… • Data stored in viewstate • Validation controls • Client & server validation
HTML-like controls • Correspond to HTML tags: • Textbox • textarea • Button • Checkbox • Radiobutton • DropDown • Image • Hyperlink • Label
Other Controls • LinkButton control • Looks like hyperlink • Acts like a button (postback) • Panel Control • Use to hide/show groups of controls • Visible property • Can still access & change hidden control properties • Use frequently
DataListing Controls • Datalisting controls • Typically fill from datasource • RadioButtonList • CheckBoxList • GridView • Repeater • DetailsView • FormView • Example: CheckBoxListControl.aspx (source) • Discuss in Ch. 13 ADO.NET
Examples • Controls Used: • Panel, textbox, button, dropdown list, checkbox list, hyperlink, label, required field validator, custom validator • Baker Snowboard: source, output
Web Form Summary • Web Server controls write HTML • Benefits: • Viewstate • Programmatic access • Properties • Events • Methods • Validation controls