Leading the way in Microsoft Office Development
 Home|Excel|Word|PowerPoint|VBA|

SharePoint

|Consultancy|Newsletter|Contact 
 SharePoint > ASP NET Controls > RequiredFieldValidator< Previous | Next > 


 
1
2
3
4
5
<asp:TextBox id="txtUserName" runat="server" />

<asp:RequiredFieldValidator Id="reqUser" runat="server"
                            ControlToValidate="txtUserName"
                            Text="Please enter a user name" />
   

 

The Text property contains the message that is displayed if the textbox is left blank.

 

 

This control cannot be used in connection with any of the following controls

 
 

DropdownList

 
 

CheckBoxList

 
 

RadioButtonList

 


 

Properties

 
 
AccessKey 
AssociatedControlID 
BackColor 
BorderColor 
BorderStyle 
BorderWidth 
ControlToValidate 
CssClass 
Display 
EnableClientScript 
DSetFocusOnError 
Enabled 
EnableTheming 
EnableViewState 
ErrorMessage 
Font-Bold 
Font-Italic 
Font-Names 
Font-Overline 
Font-Size 
Font-Strikeout 
Font-Underline 
ForeColor 
Height 
ID 
InitialValue 
ObpreRender 
OnDataBinding 
OnDisposed 
OnInt 
OnLoad 
OnUnload 
runat 
SkinID 
Style 
TabIndex 
Text 
ToolTip 
ValidationGroup 
Visible 
Width 
 

 

Methods

 
 
Validate 
 

 Copyright © 2011 Better Solutions Limited. All Rights Reserved.< Previous | Top | Next >