SlideShare a Scribd company logo
1 of 13
Types of Server Controls
ASP.NET Web Server Controls
HTML Server Controls
Creating Server Controls Dynamically
 With ASP. Net, these are any controls that run in the
server space.
o Handled by ASP. Net runtime
o Must have runt=“server” attribute within the ASP. Net web form
o Always identified with the “ID” attribute (also mandatory with
ASP. Net web controls)
 Properties, events, etc. can all be handled by server-side
code
• Label
• Textbox
• Button
• Link
• Link Button
• Dropdown List
• List Box
• Checkbox
• Radio Button
• Image
• File Upload
• Panel
• <span />
• <input type=“text” />
• <input type=“submit” />
• <a href=[#|page] />
• <a href=[postback] />
• <select />
• <select [size=x] />
• <input type=“checkbox” />
• <input type=“radio” />
• <img />
• <input type=“file” />
• <div />
• Like the ASP. Net Page object
(System.Web.UI.Page), web controls maintain
the same event processing
– Init, PreRender, Load, etc
• If AutoPostBack is set on the control, the
event will be fired immediately (causes an
automatic postback), otherwise, the event will
fire upon next page postback
• Checkbox
– Check Changed()
• Button
– Click(), Command()
• Dropdown List
– Text Changed(), SelectedIndexChanged()
• System.Web.UI.HtmlControls
– Ex: HtmlButton, HtmlTable, HtmlInputText
• These are ASP. Net HTML server controls
– Rendered as:
– <button />, <table />, <input type=“text” />
• The HtmlControls collection allows the
programmer access to HTML elements (and their
properties, etc.) from server-side code
– Hence, page content (HTML elements) can also be
dynamically generated in the code behind or
classes
• All controls in this collection inherit from the
HtmlControl class
• HtmlAnchor
• HtmlButton
• HtmlInputButton
• HtmlInputHidden
• HtmlInputText
• HtmlImage
• HtmlSelect
• HtmlTable
• HtmlTextArea
• HtmlGenericControl
<a />
<button />
<input type=“button” />
<input type=“hidden” />
<input type=“text” />
<img />
<select />
<table />
<text area />
<span />, <body />, <h1 />,
<div />…
• Properties and Events can be managed efficiently in
the code behind
• Any server control can be referenced by its ID
property
Example:
txtTextBox.Text = “Hello!”;
• Code is written by the event handler that is
defined by the control
– <asp: Button On Click=“bttnGo_Click”... />
bttnGo_Click(object sender, …) { … }
• This is the key to maintaining clean, efficient
code for processing form data and UI
interaction
• It is good practice to prefix the name of
control ID to text that indicates its “Type”
o Textbox  txtName
o Checkbox  chkCorrect
o Dropdown List  ddlProductTypes
o Panel  pnlCustInfo
• This will make it easier when referring to
the controls at runtime in code
• Data
– GridView
– DataList
– SqlDataSource
– etc.
• Validation (server-side)
– RequiredFieldValidator
– RangeValidator
– RegularExpressionValidator
• Navigation
– SiteMapPath
– Menu
– TreeView
– etc.
• Login
– Login
– LoginView
– etc.
• Everything in VB/C# is an object, therefore
ASP. Net server controls are objects as well
• Controls can be dynamically created using
server side code (VB/C#)
Control Name Properties
 RequiredFieldValidator
 CompareValidator
 RangeValidator
 RegularExpressionValidator
 CustomValidator
 ValidationSummary
ControlToValidate, Display ,
ErrorMessage,ValidationGroup,
ControlToCompare,
MaximumValue,MinimumValue
Validation Expression
Text,ClientValidationFunction,
OnServerValidate
Header Text

More Related Content

What's hot

New Form Element in HTML5
New Form Element in HTML5New Form Element in HTML5
New Form Element in HTML5Zahra Rezwana
 
ASP.NET 03 - Working With Web Server Controls
ASP.NET 03 - Working With Web Server ControlsASP.NET 03 - Working With Web Server Controls
ASP.NET 03 - Working With Web Server ControlsRandy Connolly
 
HTML5 Form Validation
HTML5 Form ValidationHTML5 Form Validation
HTML5 Form ValidationIan Oxley
 

What's hot (6)

Controls
ControlsControls
Controls
 
New Form Element in HTML5
New Form Element in HTML5New Form Element in HTML5
New Form Element in HTML5
 
ASP.NET 03 - Working With Web Server Controls
ASP.NET 03 - Working With Web Server ControlsASP.NET 03 - Working With Web Server Controls
ASP.NET 03 - Working With Web Server Controls
 
Html form tag
Html form tagHtml form tag
Html form tag
 
HTML5 Form Validation
HTML5 Form ValidationHTML5 Form Validation
HTML5 Form Validation
 
Html forms
Html formsHtml forms
Html forms
 

Viewers also liked

ENOG 9 - RIPE vs RIPE NCC from the beginning to after the NTIA transition
ENOG 9 - RIPE vs RIPE NCC from the beginning to after the NTIA transitionENOG 9 - RIPE vs RIPE NCC from the beginning to after the NTIA transition
ENOG 9 - RIPE vs RIPE NCC from the beginning to after the NTIA transitionHans Petter Holen
 
Skuteczna komunikacja | w 6 krokach
Skuteczna komunikacja | w 6 krokach Skuteczna komunikacja | w 6 krokach
Skuteczna komunikacja | w 6 krokach Mateusz Czech
 
See4 RIPE vs RIPE NCC from the beginning to after the NTIA transition
See4   RIPE vs RIPE NCC from the beginning to after the NTIA transitionSee4   RIPE vs RIPE NCC from the beginning to after the NTIA transition
See4 RIPE vs RIPE NCC from the beginning to after the NTIA transitionHans Petter Holen
 
Presentatie exercise 4 2
Presentatie exercise 4 2Presentatie exercise 4 2
Presentatie exercise 4 2Arnaud Veere
 
BMJ Open-2015-Braithwaite-
BMJ Open-2015-Braithwaite-BMJ Open-2015-Braithwaite-
BMJ Open-2015-Braithwaite-Wayne Mulligan
 
Tolios_trapezes_paragwgiki_anasygkrothsh
Tolios_trapezes_paragwgiki_anasygkrothshTolios_trapezes_paragwgiki_anasygkrothsh
Tolios_trapezes_paragwgiki_anasygkrothshallagiporeias
 

Viewers also liked (19)

KATHERINERESUME2
KATHERINERESUME2KATHERINERESUME2
KATHERINERESUME2
 
வெற்றி
வெற்றிவெற்றி
வெற்றி
 
ENOG 9 - RIPE vs RIPE NCC from the beginning to after the NTIA transition
ENOG 9 - RIPE vs RIPE NCC from the beginning to after the NTIA transitionENOG 9 - RIPE vs RIPE NCC from the beginning to after the NTIA transition
ENOG 9 - RIPE vs RIPE NCC from the beginning to after the NTIA transition
 
வெற்றி
வெற்றிவெற்றி
வெற்றி
 
Skuteczna komunikacja | w 6 krokach
Skuteczna komunikacja | w 6 krokach Skuteczna komunikacja | w 6 krokach
Skuteczna komunikacja | w 6 krokach
 
20150324 av vvc
20150324 av vvc20150324 av vvc
20150324 av vvc
 
See4 RIPE vs RIPE NCC from the beginning to after the NTIA transition
See4   RIPE vs RIPE NCC from the beginning to after the NTIA transitionSee4   RIPE vs RIPE NCC from the beginning to after the NTIA transition
See4 RIPE vs RIPE NCC from the beginning to after the NTIA transition
 
Reception Admin Resume
Reception Admin ResumeReception Admin Resume
Reception Admin Resume
 
Presentatie exercise 4 2
Presentatie exercise 4 2Presentatie exercise 4 2
Presentatie exercise 4 2
 
Ewe brochure
Ewe brochureEwe brochure
Ewe brochure
 
CP DOHA EXPERIENCE
CP DOHA EXPERIENCECP DOHA EXPERIENCE
CP DOHA EXPERIENCE
 
KOWSHIKAA CONSULTANCY OVERSEAS
KOWSHIKAA CONSULTANCY OVERSEAS KOWSHIKAA CONSULTANCY OVERSEAS
KOWSHIKAA CONSULTANCY OVERSEAS
 
Dados de Mercado Maio de 2016
Dados de Mercado Maio de 2016Dados de Mercado Maio de 2016
Dados de Mercado Maio de 2016
 
BMJ Open-2015-Braithwaite-
BMJ Open-2015-Braithwaite-BMJ Open-2015-Braithwaite-
BMJ Open-2015-Braithwaite-
 
Tolios_trapezes_paragwgiki_anasygkrothsh
Tolios_trapezes_paragwgiki_anasygkrothshTolios_trapezes_paragwgiki_anasygkrothsh
Tolios_trapezes_paragwgiki_anasygkrothsh
 
MS SQL BI platform
MS SQL BI platformMS SQL BI platform
MS SQL BI platform
 
Концепция площадки ОГФ-2015 "Медиация"
Концепция площадки ОГФ-2015 "Медиация"Концепция площадки ОГФ-2015 "Медиация"
Концепция площадки ОГФ-2015 "Медиация"
 
வெற்றி
வெற்றிவெற்றி
வெற்றி
 
DODIG-2015-009
DODIG-2015-009DODIG-2015-009
DODIG-2015-009
 

Similar to ASP.NET Server Controls Guide

Html5ppt
Html5pptHtml5ppt
Html5pptrecroup
 
HTML5 New and Improved
HTML5   New and ImprovedHTML5   New and Improved
HTML5 New and ImprovedTimothy Fisher
 
Asp.net server controls
Asp.net server controlsAsp.net server controls
Asp.net server controlsRaed Aldahdooh
 
The complete ASP.NET (IIS) Tutorial with code example in power point slide show
The complete ASP.NET (IIS) Tutorial with code example in power point slide showThe complete ASP.NET (IIS) Tutorial with code example in power point slide show
The complete ASP.NET (IIS) Tutorial with code example in power point slide showSubhas Malik
 
05.Blend Expression, Transformation & Animation
05.Blend Expression, Transformation & Animation05.Blend Expression, Transformation & Animation
05.Blend Expression, Transformation & AnimationNguyen Tuan
 
Best Practices in Qt Quick/QML - Part 2
Best Practices in Qt Quick/QML - Part 2Best Practices in Qt Quick/QML - Part 2
Best Practices in Qt Quick/QML - Part 2Janel Heilbrunn
 
Best Practices in Qt Quick/QML - Part 2
Best Practices in Qt Quick/QML - Part 2Best Practices in Qt Quick/QML - Part 2
Best Practices in Qt Quick/QML - Part 2ICS
 
ASP.NET Session 6
ASP.NET Session 6ASP.NET Session 6
ASP.NET Session 6Sisir Ghosh
 
Xml part 6
Xml part 6Xml part 6
Xml part 6NOHA AW
 
Silverlight 2 For Developers
Silverlight 2 For DevelopersSilverlight 2 For Developers
Silverlight 2 For DevelopersMithun T. Dhar
 
Build a game with javascript (may 21 atlanta)
Build a game with javascript (may 21 atlanta)Build a game with javascript (may 21 atlanta)
Build a game with javascript (may 21 atlanta)Thinkful
 
Scripting languages
Scripting languagesScripting languages
Scripting languagesteach4uin
 

Similar to ASP.NET Server Controls Guide (20)

Controls in asp.net
Controls in asp.netControls in asp.net
Controls in asp.net
 
uptu web technology unit 2 html
uptu web technology unit 2 htmluptu web technology unit 2 html
uptu web technology unit 2 html
 
Html4
Html4Html4
Html4
 
Html5ppt
Html5pptHtml5ppt
Html5ppt
 
HTML5 New and Improved
HTML5   New and ImprovedHTML5   New and Improved
HTML5 New and Improved
 
2310 b 05
2310 b 052310 b 05
2310 b 05
 
Asp PPT (.NET )
Asp PPT (.NET )Asp PPT (.NET )
Asp PPT (.NET )
 
Asp.net server controls
Asp.net server controlsAsp.net server controls
Asp.net server controls
 
ASP DOT NET
ASP DOT NETASP DOT NET
ASP DOT NET
 
The complete ASP.NET (IIS) Tutorial with code example in power point slide show
The complete ASP.NET (IIS) Tutorial with code example in power point slide showThe complete ASP.NET (IIS) Tutorial with code example in power point slide show
The complete ASP.NET (IIS) Tutorial with code example in power point slide show
 
05.Blend Expression, Transformation & Animation
05.Blend Expression, Transformation & Animation05.Blend Expression, Transformation & Animation
05.Blend Expression, Transformation & Animation
 
Best Practices in Qt Quick/QML - Part 2
Best Practices in Qt Quick/QML - Part 2Best Practices in Qt Quick/QML - Part 2
Best Practices in Qt Quick/QML - Part 2
 
Best Practices in Qt Quick/QML - Part 2
Best Practices in Qt Quick/QML - Part 2Best Practices in Qt Quick/QML - Part 2
Best Practices in Qt Quick/QML - Part 2
 
Chapter 6
Chapter 6Chapter 6
Chapter 6
 
ASP.NET Session 6
ASP.NET Session 6ASP.NET Session 6
ASP.NET Session 6
 
Xml part 6
Xml part 6Xml part 6
Xml part 6
 
Silverlight 2 For Developers
Silverlight 2 For DevelopersSilverlight 2 For Developers
Silverlight 2 For Developers
 
Cmsc 100 (web forms)
Cmsc 100 (web forms)Cmsc 100 (web forms)
Cmsc 100 (web forms)
 
Build a game with javascript (may 21 atlanta)
Build a game with javascript (may 21 atlanta)Build a game with javascript (may 21 atlanta)
Build a game with javascript (may 21 atlanta)
 
Scripting languages
Scripting languagesScripting languages
Scripting languages
 

More from Shrijan Tiwari

ASPX Session xi(page lifecycle)
ASPX Session xi(page lifecycle)ASPX Session xi(page lifecycle)
ASPX Session xi(page lifecycle)Shrijan Tiwari
 
Session viii(state mngtserver)
Session viii(state mngtserver)Session viii(state mngtserver)
Session viii(state mngtserver)Shrijan Tiwari
 
Session viii(state mngtclient)
Session viii(state mngtclient)Session viii(state mngtclient)
Session viii(state mngtclient)Shrijan Tiwari
 
Session vii(java scriptbasics)
Session vii(java scriptbasics)Session vii(java scriptbasics)
Session vii(java scriptbasics)Shrijan Tiwari
 
Session vi(user control)
Session vi(user control)Session vi(user control)
Session vi(user control)Shrijan Tiwari
 
Session iv(master pages)
Session iv(master pages)Session iv(master pages)
Session iv(master pages)Shrijan Tiwari
 
Session i(introduction)
Session i(introduction)Session i(introduction)
Session i(introduction)Shrijan Tiwari
 
Introduction to android
Introduction to androidIntroduction to android
Introduction to androidShrijan Tiwari
 

More from Shrijan Tiwari (12)

ASPX Session xi(page lifecycle)
ASPX Session xi(page lifecycle)ASPX Session xi(page lifecycle)
ASPX Session xi(page lifecycle)
 
Session x(ado.net)
Session x(ado.net)Session x(ado.net)
Session x(ado.net)
 
Session viii(state mngtserver)
Session viii(state mngtserver)Session viii(state mngtserver)
Session viii(state mngtserver)
 
Session viii(state mngtclient)
Session viii(state mngtclient)Session viii(state mngtclient)
Session viii(state mngtclient)
 
Session vii(java scriptbasics)
Session vii(java scriptbasics)Session vii(java scriptbasics)
Session vii(java scriptbasics)
 
Session vi(user control)
Session vi(user control)Session vi(user control)
Session vi(user control)
 
Session v(css)
Session v(css)Session v(css)
Session v(css)
 
Session ix(database)
Session ix(database)Session ix(database)
Session ix(database)
 
Session iv(master pages)
Session iv(master pages)Session iv(master pages)
Session iv(master pages)
 
Session ii(html)
Session ii(html)Session ii(html)
Session ii(html)
 
Session i(introduction)
Session i(introduction)Session i(introduction)
Session i(introduction)
 
Introduction to android
Introduction to androidIntroduction to android
Introduction to android
 

Recently uploaded

Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataBradBedford3
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackVICTOR MAESTRE RAMIREZ
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideChristina Lin
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...soniya singh
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfkalichargn70th171
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsAndolasoft Inc
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionSolGuruz
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 
Test Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendTest Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendArshad QA
 

Recently uploaded (20)

Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStack
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
Test Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendTest Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and Backend
 

ASP.NET Server Controls Guide

  • 1. Types of Server Controls ASP.NET Web Server Controls HTML Server Controls Creating Server Controls Dynamically
  • 2.  With ASP. Net, these are any controls that run in the server space. o Handled by ASP. Net runtime o Must have runt=“server” attribute within the ASP. Net web form o Always identified with the “ID” attribute (also mandatory with ASP. Net web controls)  Properties, events, etc. can all be handled by server-side code
  • 3. • Label • Textbox • Button • Link • Link Button • Dropdown List • List Box • Checkbox • Radio Button • Image • File Upload • Panel • <span /> • <input type=“text” /> • <input type=“submit” /> • <a href=[#|page] /> • <a href=[postback] /> • <select /> • <select [size=x] /> • <input type=“checkbox” /> • <input type=“radio” /> • <img /> • <input type=“file” /> • <div />
  • 4. • Like the ASP. Net Page object (System.Web.UI.Page), web controls maintain the same event processing – Init, PreRender, Load, etc • If AutoPostBack is set on the control, the event will be fired immediately (causes an automatic postback), otherwise, the event will fire upon next page postback • Checkbox – Check Changed() • Button – Click(), Command() • Dropdown List – Text Changed(), SelectedIndexChanged()
  • 5. • System.Web.UI.HtmlControls – Ex: HtmlButton, HtmlTable, HtmlInputText • These are ASP. Net HTML server controls – Rendered as: – <button />, <table />, <input type=“text” />
  • 6. • The HtmlControls collection allows the programmer access to HTML elements (and their properties, etc.) from server-side code – Hence, page content (HTML elements) can also be dynamically generated in the code behind or classes • All controls in this collection inherit from the HtmlControl class
  • 7. • HtmlAnchor • HtmlButton • HtmlInputButton • HtmlInputHidden • HtmlInputText • HtmlImage • HtmlSelect • HtmlTable • HtmlTextArea • HtmlGenericControl <a /> <button /> <input type=“button” /> <input type=“hidden” /> <input type=“text” /> <img /> <select /> <table /> <text area /> <span />, <body />, <h1 />, <div />…
  • 8. • Properties and Events can be managed efficiently in the code behind • Any server control can be referenced by its ID property Example: txtTextBox.Text = “Hello!”;
  • 9. • Code is written by the event handler that is defined by the control – <asp: Button On Click=“bttnGo_Click”... /> bttnGo_Click(object sender, …) { … } • This is the key to maintaining clean, efficient code for processing form data and UI interaction
  • 10. • It is good practice to prefix the name of control ID to text that indicates its “Type” o Textbox  txtName o Checkbox  chkCorrect o Dropdown List  ddlProductTypes o Panel  pnlCustInfo • This will make it easier when referring to the controls at runtime in code
  • 11. • Data – GridView – DataList – SqlDataSource – etc. • Validation (server-side) – RequiredFieldValidator – RangeValidator – RegularExpressionValidator • Navigation – SiteMapPath – Menu – TreeView – etc. • Login – Login – LoginView – etc.
  • 12. • Everything in VB/C# is an object, therefore ASP. Net server controls are objects as well • Controls can be dynamically created using server side code (VB/C#)
  • 13. Control Name Properties  RequiredFieldValidator  CompareValidator  RangeValidator  RegularExpressionValidator  CustomValidator  ValidationSummary ControlToValidate, Display , ErrorMessage,ValidationGroup, ControlToCompare, MaximumValue,MinimumValue Validation Expression Text,ClientValidationFunction, OnServerValidate Header Text