SlideShare uma empresa Scribd logo
1 de 20
sanila.p
sanila222@gmail.com
www.facebook.com/username
twitter.com/sanila92
linkedin.com/sanila
ASP.NET CONTROLS
controls
• Controls are the building blocks in web form
• Server controls are tags that are understood
by the server.
Asp.net controls
server control
Html server
control
Webserver
control
Validation
server control
Html server control
• HTML server controls are HTML tags
understood by the server
• All HTML server controls must be within a
<form> tag with the runat="server" attribute.
• The runat="server" attribute indicates that the
form should be processed on the server.
Html server controls in asp.net
Html server controls Description
Controls an <a> HTML element
HtmlButton Controls a <button> HTML
element
HtmlInputButton Controls <input
type="button">, <input
type="submit">, and <input
type="reset"> HTML elements
HtmlInputCheckBox Controls an <input
type="checkbox"> HTML
element
HtmlInputRadioButton Controls an <input
type="radio"> HTML element
HtmlTextArea Controls a <textarea> HTML
element
Example
<html>
<body>
<form runat="server">
<input id="Text1" type="text" />
</form>
</body>
</html>
Web server control
• Web server controls are special ASP.NET tags
understood by the server
• Web server controls are also created on the
server and they require a runat="server"
attribute to work.
Webserver control Description
AdRotator Displays a sequence of images
Button Displays a push button
BulletedList Creates a list in bullet format
Repeater Displays a repeated list of items
bound to the control
HyperLink Creates a hyperlink
Example
<html>
<body>
<form runat="server">
<asp:Button id="button1" Text="Click me!"
runat="server" OnClick="submit"/>
</form>
</body>
</html>
Validation server control
• Validation server controls are used to validate user-input. If
the user-input does not pass validation, it will display an error
message to the user.
• Each validation control performs a specific type of validation
(like validating against a specific value or a range of values).
• By default, page validation is performed when a Button, is
clicked. You can prevent validation when a button control is
clicked by setting the CausesValidation property to false
Validation Server Control Description
CompareValidator Compares the value of one input
control to the value of another input
control or to a fixed value
CustomValidator Allows you to write a method to
handle the validation of the value
entered
RangeValidator Checks that the user enters a value
that falls between two values
RegularExpressionValidator Ensures that the value of an input
control matches a specified pattern
RequiredFieldValidator Makes an input control a required
field
ValidationSummary Displays a report of all validation
errors occurred in a Web page
Example
<html>
<body>
<form runat="server">
<p>Enter a number from 1 to 100:
<asp:TextBox id="tbox1" runat="server" />
<br /><br />
<asp:Button Text="Submit" runat="server" />
<asp:RangeValidator
ControlToValidate="tbox1"
MinimumValue="1"
MaximumValue="100"
Type="Integer"
Text="The value must be from 1 to 100!"
runat="server" />
</form>
</body>
</html>
Difference between server control
and html control
 Asp.net server control: retain state
 Html control: does not retain state
Example
Want to learn more about programming or Looking to become a good programmer?
Are you wasting time on searching so many contents online?
Do you want to learn things quickly?
Tired of spending huge amount of money to become a Software professional?
Do an online course
@ baabtra.com
We put industry standards to practice. Our structured, activity based courses are so designed
to make a quick, good software professional out of anybody who holds a passion for coding.
Follow us @ twitter.com/baabtra
Like us @ facebook.com/baabtra
Subscribe to us @ youtube.com/baabtra
Become a follower @ slideshare.net/BaabtraMentoringPartner
Connect to us @ in.linkedin.com/in/baabtra
Give a feedback @ massbaab.com/baabtra
Thanks in advance
www.baabtra.com | www.massbaab.com |www.baabte.com
Emarald Mall (Big Bazar Building)
Mavoor Road, Kozhikode,
Kerala, India.
Ph: + 91 – 495 40 25 550
NC Complex, Near Bus Stand
Mukkam, Kozhikode,
Kerala, India.
Ph: + 91 – 495 40 25 550
Cafit Square,
Hilite Business Park,
Near Pantheerankavu,
Kozhikode
Start up Village
Eranakulam,
Kerala, India.
Email: info@baabtra.com
Contact Us

Mais conteúdo relacionado

Mais procurados

ASP.NET Session 9
ASP.NET Session 9ASP.NET Session 9
ASP.NET Session 9
Sisir Ghosh
 
Introduction To Asp.Net Ajax
Introduction To Asp.Net AjaxIntroduction To Asp.Net Ajax
Introduction To Asp.Net Ajax
Jeff Blankenburg
 
Ajax control tool kit
Ajax control tool kitAjax control tool kit
Ajax control tool kit
Vidhi Patel
 
ASP.NET Overview - Alvin Lau
ASP.NET Overview - Alvin LauASP.NET Overview - Alvin Lau
ASP.NET Overview - Alvin Lau
Spiffy
 
ASP.NET Session 6
ASP.NET Session 6ASP.NET Session 6
ASP.NET Session 6
Sisir Ghosh
 
03 asp.net session04
03 asp.net session0403 asp.net session04
03 asp.net session04
Mani Chaubey
 

Mais procurados (20)

ASP.NET Session 9
ASP.NET Session 9ASP.NET Session 9
ASP.NET Session 9
 
Ajax control asp.net
Ajax control asp.netAjax control asp.net
Ajax control asp.net
 
Introduction To Asp.Net Ajax
Introduction To Asp.Net AjaxIntroduction To Asp.Net Ajax
Introduction To Asp.Net Ajax
 
03 asp.net session04
03 asp.net session0403 asp.net session04
03 asp.net session04
 
Visual studio 2008 asp net
Visual studio 2008 asp netVisual studio 2008 asp net
Visual studio 2008 asp net
 
Ajax control tool kit
Ajax control tool kitAjax control tool kit
Ajax control tool kit
 
Web forms in ASP.net
Web forms in ASP.netWeb forms in ASP.net
Web forms in ASP.net
 
Ajax and ASP.NET AJAX
Ajax and ASP.NET AJAXAjax and ASP.NET AJAX
Ajax and ASP.NET AJAX
 
Asp.net.
Asp.net.Asp.net.
Asp.net.
 
ASP.NET Page Life Cycle
ASP.NET Page Life CycleASP.NET Page Life Cycle
ASP.NET Page Life Cycle
 
Asp.NET Validation controls
Asp.NET Validation controlsAsp.NET Validation controls
Asp.NET Validation controls
 
Introduction to asp
Introduction to aspIntroduction to asp
Introduction to asp
 
ASP.NET Overview - Alvin Lau
ASP.NET Overview - Alvin LauASP.NET Overview - Alvin Lau
ASP.NET Overview - Alvin Lau
 
ASP.NET 4.0 Roadmap
ASP.NET 4.0 RoadmapASP.NET 4.0 Roadmap
ASP.NET 4.0 Roadmap
 
ASP.NET Session 6
ASP.NET Session 6ASP.NET Session 6
ASP.NET Session 6
 
Overview of ASP.Net by software outsourcing company india
Overview of ASP.Net by software outsourcing company indiaOverview of ASP.Net by software outsourcing company india
Overview of ASP.Net by software outsourcing company india
 
Ruby on rails3 - introduction to rails
Ruby on rails3 - introduction to railsRuby on rails3 - introduction to rails
Ruby on rails3 - introduction to rails
 
1. deploying an asp.net web application
1. deploying an asp.net web application1. deploying an asp.net web application
1. deploying an asp.net web application
 
Validation controls in asp
Validation controls in aspValidation controls in asp
Validation controls in asp
 
03 asp.net session04
03 asp.net session0403 asp.net session04
03 asp.net session04
 

Semelhante a Controls in asp.net

vnd.openxmlformats-officedocument.presentationml.presentation&rendition=1.pptx
vnd.openxmlformats-officedocument.presentationml.presentation&rendition=1.pptxvnd.openxmlformats-officedocument.presentationml.presentation&rendition=1.pptx
vnd.openxmlformats-officedocument.presentationml.presentation&rendition=1.pptx
YamunaS38
 

Semelhante a Controls in asp.net (20)

Controls
ControlsControls
Controls
 
Html tables, forms and audio video
Html tables, forms and audio videoHtml tables, forms and audio video
Html tables, forms and audio video
 
Controls
ControlsControls
Controls
 
vnd.openxmlformats-officedocument.presentationml.presentation&rendition=1.pptx
vnd.openxmlformats-officedocument.presentationml.presentation&rendition=1.pptxvnd.openxmlformats-officedocument.presentationml.presentation&rendition=1.pptx
vnd.openxmlformats-officedocument.presentationml.presentation&rendition=1.pptx
 
Ch3 server controls
Ch3 server controlsCh3 server controls
Ch3 server controls
 
validation-controls.pdf ioue8n uoh souu o3i
validation-controls.pdf ioue8n uoh souu  o3ivalidation-controls.pdf ioue8n uoh souu  o3i
validation-controls.pdf ioue8n uoh souu o3i
 
Session iii(server controls)
Session iii(server controls)Session iii(server controls)
Session iii(server controls)
 
Html forms
Html formsHtml forms
Html forms
 
Validation Controls in asp.net
Validation Controls in asp.netValidation Controls in asp.net
Validation Controls in asp.net
 
Chapter 3 (validation control)
Chapter 3 (validation control)Chapter 3 (validation control)
Chapter 3 (validation control)
 
Chapter 9: Forms
Chapter 9: FormsChapter 9: Forms
Chapter 9: Forms
 
Html forms
Html formsHtml forms
Html forms
 
uptu web technology unit 2 html
uptu web technology unit 2 htmluptu web technology unit 2 html
uptu web technology unit 2 html
 
2310 b 07
2310 b 072310 b 07
2310 b 07
 
HTML Forms
HTML FormsHTML Forms
HTML Forms
 
Html4
Html4Html4
Html4
 
Html4
Html4Html4
Html4
 
JavaScript - Chapter 14 - Form Handling
 JavaScript - Chapter 14 - Form Handling   JavaScript - Chapter 14 - Form Handling
JavaScript - Chapter 14 - Form Handling
 
Html Form Controls
Html Form ControlsHtml Form Controls
Html Form Controls
 
7.pptx
7.pptx7.pptx
7.pptx
 

Mais de baabtra.com - No. 1 supplier of quality freshers

Mais de baabtra.com - No. 1 supplier of quality freshers (20)

Agile methodology and scrum development
Agile methodology and scrum developmentAgile methodology and scrum development
Agile methodology and scrum development
 
Best coding practices
Best coding practicesBest coding practices
Best coding practices
 
Core java - baabtra
Core java - baabtraCore java - baabtra
Core java - baabtra
 
Acquiring new skills what you should know
Acquiring new skills   what you should knowAcquiring new skills   what you should know
Acquiring new skills what you should know
 
Baabtra.com programming at school
Baabtra.com programming at schoolBaabtra.com programming at school
Baabtra.com programming at school
 
99LMS for Enterprises - LMS that you will love
99LMS for Enterprises - LMS that you will love 99LMS for Enterprises - LMS that you will love
99LMS for Enterprises - LMS that you will love
 
Php sessions & cookies
Php sessions & cookiesPhp sessions & cookies
Php sessions & cookies
 
Php database connectivity
Php database connectivityPhp database connectivity
Php database connectivity
 
Chapter 6 database normalisation
Chapter 6  database normalisationChapter 6  database normalisation
Chapter 6 database normalisation
 
Chapter 5 transactions and dcl statements
Chapter 5  transactions and dcl statementsChapter 5  transactions and dcl statements
Chapter 5 transactions and dcl statements
 
Chapter 4 functions, views, indexing
Chapter 4  functions, views, indexingChapter 4  functions, views, indexing
Chapter 4 functions, views, indexing
 
Chapter 3 stored procedures
Chapter 3 stored proceduresChapter 3 stored procedures
Chapter 3 stored procedures
 
Chapter 2 grouping,scalar and aggergate functions,joins inner join,outer join
Chapter 2  grouping,scalar and aggergate functions,joins   inner join,outer joinChapter 2  grouping,scalar and aggergate functions,joins   inner join,outer join
Chapter 2 grouping,scalar and aggergate functions,joins inner join,outer join
 
Chapter 1 introduction to sql server
Chapter 1 introduction to sql serverChapter 1 introduction to sql server
Chapter 1 introduction to sql server
 
Chapter 1 introduction to sql server
Chapter 1 introduction to sql serverChapter 1 introduction to sql server
Chapter 1 introduction to sql server
 
Microsoft holo lens
Microsoft holo lensMicrosoft holo lens
Microsoft holo lens
 
Blue brain
Blue brainBlue brain
Blue brain
 
5g
5g5g
5g
 
Aptitude skills baabtra
Aptitude skills baabtraAptitude skills baabtra
Aptitude skills baabtra
 
Gd baabtra
Gd baabtraGd baabtra
Gd baabtra
 

Último

Structuring Teams and Portfolios for Success
Structuring Teams and Portfolios for SuccessStructuring Teams and Portfolios for Success
Structuring Teams and Portfolios for Success
UXDXConf
 

Último (20)

What's New in Teams Calling, Meetings and Devices April 2024
What's New in Teams Calling, Meetings and Devices April 2024What's New in Teams Calling, Meetings and Devices April 2024
What's New in Teams Calling, Meetings and Devices April 2024
 
Free and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
Free and Effective: Making Flows Publicly Accessible, Yumi IbrahimzadeFree and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
Free and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
 
A Business-Centric Approach to Design System Strategy
A Business-Centric Approach to Design System StrategyA Business-Centric Approach to Design System Strategy
A Business-Centric Approach to Design System Strategy
 
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
 
AI presentation and introduction - Retrieval Augmented Generation RAG 101
AI presentation and introduction - Retrieval Augmented Generation RAG 101AI presentation and introduction - Retrieval Augmented Generation RAG 101
AI presentation and introduction - Retrieval Augmented Generation RAG 101
 
Syngulon - Selection technology May 2024.pdf
Syngulon - Selection technology May 2024.pdfSyngulon - Selection technology May 2024.pdf
Syngulon - Selection technology May 2024.pdf
 
Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024
 
10 Differences between Sales Cloud and CPQ, Blanka Doktorová
10 Differences between Sales Cloud and CPQ, Blanka Doktorová10 Differences between Sales Cloud and CPQ, Blanka Doktorová
10 Differences between Sales Cloud and CPQ, Blanka Doktorová
 
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
 
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
 
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptxUnpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
 
IESVE for Early Stage Design and Planning
IESVE for Early Stage Design and PlanningIESVE for Early Stage Design and Planning
IESVE for Early Stage Design and Planning
 
THE BEST IPTV in GERMANY for 2024: IPTVreel
THE BEST IPTV in  GERMANY for 2024: IPTVreelTHE BEST IPTV in  GERMANY for 2024: IPTVreel
THE BEST IPTV in GERMANY for 2024: IPTVreel
 
WebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM PerformanceWebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM Performance
 
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdfIntroduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
 
UiPath Test Automation using UiPath Test Suite series, part 1
UiPath Test Automation using UiPath Test Suite series, part 1UiPath Test Automation using UiPath Test Suite series, part 1
UiPath Test Automation using UiPath Test Suite series, part 1
 
Enterprise Knowledge Graphs - Data Summit 2024
Enterprise Knowledge Graphs - Data Summit 2024Enterprise Knowledge Graphs - Data Summit 2024
Enterprise Knowledge Graphs - Data Summit 2024
 
PLAI - Acceleration Program for Generative A.I. Startups
PLAI - Acceleration Program for Generative A.I. StartupsPLAI - Acceleration Program for Generative A.I. Startups
PLAI - Acceleration Program for Generative A.I. Startups
 
Structuring Teams and Portfolios for Success
Structuring Teams and Portfolios for SuccessStructuring Teams and Portfolios for Success
Structuring Teams and Portfolios for Success
 
Buy Epson EcoTank L3210 Colour Printer Online.pdf
Buy Epson EcoTank L3210 Colour Printer Online.pdfBuy Epson EcoTank L3210 Colour Printer Online.pdf
Buy Epson EcoTank L3210 Colour Printer Online.pdf
 

Controls in asp.net

  • 1.
  • 3. controls • Controls are the building blocks in web form • Server controls are tags that are understood by the server.
  • 4. Asp.net controls server control Html server control Webserver control Validation server control
  • 5. Html server control • HTML server controls are HTML tags understood by the server • All HTML server controls must be within a <form> tag with the runat="server" attribute. • The runat="server" attribute indicates that the form should be processed on the server.
  • 6. Html server controls in asp.net Html server controls Description Controls an <a> HTML element HtmlButton Controls a <button> HTML element HtmlInputButton Controls <input type="button">, <input type="submit">, and <input type="reset"> HTML elements HtmlInputCheckBox Controls an <input type="checkbox"> HTML element HtmlInputRadioButton Controls an <input type="radio"> HTML element HtmlTextArea Controls a <textarea> HTML element
  • 8. <html> <body> <form runat="server"> <input id="Text1" type="text" /> </form> </body> </html>
  • 9. Web server control • Web server controls are special ASP.NET tags understood by the server • Web server controls are also created on the server and they require a runat="server" attribute to work.
  • 10. Webserver control Description AdRotator Displays a sequence of images Button Displays a push button BulletedList Creates a list in bullet format Repeater Displays a repeated list of items bound to the control HyperLink Creates a hyperlink
  • 12. <html> <body> <form runat="server"> <asp:Button id="button1" Text="Click me!" runat="server" OnClick="submit"/> </form> </body> </html>
  • 13. Validation server control • Validation server controls are used to validate user-input. If the user-input does not pass validation, it will display an error message to the user. • Each validation control performs a specific type of validation (like validating against a specific value or a range of values). • By default, page validation is performed when a Button, is clicked. You can prevent validation when a button control is clicked by setting the CausesValidation property to false
  • 14. Validation Server Control Description CompareValidator Compares the value of one input control to the value of another input control or to a fixed value CustomValidator Allows you to write a method to handle the validation of the value entered RangeValidator Checks that the user enters a value that falls between two values RegularExpressionValidator Ensures that the value of an input control matches a specified pattern RequiredFieldValidator Makes an input control a required field ValidationSummary Displays a report of all validation errors occurred in a Web page
  • 16. <html> <body> <form runat="server"> <p>Enter a number from 1 to 100: <asp:TextBox id="tbox1" runat="server" /> <br /><br /> <asp:Button Text="Submit" runat="server" /> <asp:RangeValidator ControlToValidate="tbox1" MinimumValue="1" MaximumValue="100" Type="Integer" Text="The value must be from 1 to 100!" runat="server" /> </form> </body> </html>
  • 17. Difference between server control and html control  Asp.net server control: retain state  Html control: does not retain state Example
  • 18. Want to learn more about programming or Looking to become a good programmer? Are you wasting time on searching so many contents online? Do you want to learn things quickly? Tired of spending huge amount of money to become a Software professional? Do an online course @ baabtra.com We put industry standards to practice. Our structured, activity based courses are so designed to make a quick, good software professional out of anybody who holds a passion for coding.
  • 19. Follow us @ twitter.com/baabtra Like us @ facebook.com/baabtra Subscribe to us @ youtube.com/baabtra Become a follower @ slideshare.net/BaabtraMentoringPartner Connect to us @ in.linkedin.com/in/baabtra Give a feedback @ massbaab.com/baabtra Thanks in advance www.baabtra.com | www.massbaab.com |www.baabte.com
  • 20. Emarald Mall (Big Bazar Building) Mavoor Road, Kozhikode, Kerala, India. Ph: + 91 – 495 40 25 550 NC Complex, Near Bus Stand Mukkam, Kozhikode, Kerala, India. Ph: + 91 – 495 40 25 550 Cafit Square, Hilite Business Park, Near Pantheerankavu, Kozhikode Start up Village Eranakulam, Kerala, India. Email: info@baabtra.com Contact Us