you can use this functionality to set default text of textbox
<asp:TextBox ID="txtMinSearch" runat="server"
ForeColor="GrayText" Text="Enter property name, address or GENIE ID."
onClick="if(this.value=='Enter property name, address or GENIE ID.')this.value='';"
onBlur="if(this.value=='')this.value='Enter property name, address or GENIE ID.';"
ControlToValidate="txtMinSearch" ClientIDMode="Static">
</asp:TextBox>
if you provide validation on textbox by using its default functionality then you controlToValidate property and in CS you should apply regex for validation.
Regex.IsMatch(txtMinSearch.Text, @"^\d+([,][\s]\d+)*$")
No comments:
Post a Comment