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

Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...OnePlan Solutions
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AIABDERRAOUF MEHENNI
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
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
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Steffen Staab
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
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 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
 
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
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 
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
 
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
 
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceCALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceanilsa9823
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 

Recently uploaded (20)

Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
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
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
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 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...
 
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
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
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
 
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
 
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceCALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 

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