Professional Documents
Culture Documents
User Controls,
Master Pages
Server Controls
Validation Controls
<asp:RequiredFieldValidator>
<asp:RangeValidator>
<asp:CompareValidator>
<asp:RegularExpressionValidator>
<asp:CustomValidator>
<asp:ValidationSummary>
http/33msdn.microsoft.com3en,!s3ma"a4ine3bb56789:.asp%
<4 5 -a)e 6an)ua)e=""7"
ClientTar)et="8o9n6evel" 4>
Server Controls
Validation Controls
.emo/ ValidationControls;.asp%
<configuration>
<appSettings>
<add
key="ValidationSettings:UnobtrusiveValidationMode"
value="none"/>
</appSettings>
</configuration>
Server Controls
Validation Controls
?f a validation control0s
'nableClientS"ript propert$ is "rue, the
validator performs client,side validation as the
!ser edits the Web -orm.
Master pa"es have the file,name e%tension .master and, li+e Web
-orms, can optionall$ !se a code,behind file to define additional
f!nctionalit$.
Set both the width and hei"ht of the table to ;88 percent. Ma+e
s!re that the Si(e val!e in the )orders section is 8.
Clic+ OK to create a table that fills the pa"e and contains two rows.
Set the +eig)t of the top table cell to ./0. Add an Image control
named )eaderImage with its ImageUrl propert$ set to the
bug*bug.png file.
ug*ug.master pa"e that defines a lo"o
ima"e header for all pa"es
Master 'a"es
Creating a Content Page
The Title propert$ specifies the title that will be displa$ed in the
web browser0s title bar when the content pa"e is loaded.
'lace the c!rsor inside the Content control in !esign mode and
do!ble clic+ Create=serWi4ard in the "oolbox to add it to the pa"e.
2pen the %reate*ser+i(ard "asks smart,ta" men! and clic+ Auto
,ormat. Select the Proessional color scheme.
When the !ser clic+s the %reate *ser b!tton, AS'.()T verifies that
all the form0s re<!irements were f!lfilled and attempts to create the !ser
acco!nt. (we will !se this ne%t wee+C
Create &efore=serControl.asp%
Create After=serControl.asp%
$age.!oadControl2string sour&e3
Create an instance/
Control numbox. 4 $age.!oadControl25numberbox.as&x536
Create.$namic=serControls.asp%
Creatin" Controls
C!stom Controls
http/33msdn.microsoft.com3en,!s3librar$34tB9tfh$.asp%
using System
using System!"eb
using System!"eb!U#
public class My$ontrol : $ontrol %
protected override void &ender'()M*)e+t"riter ,- %
,!"rite'.</0>$ontrol output<//0>1-
2
2
Creatin" Controls
C!stom Controls
*ender them
Handle events