I have ErrorMessage in my attributes being set ..
For example:
<asp:TextBox ID="FullName" runat="server" ></asp:TextBox>
<asp:TextBoxWatermarkExtender ID="Surname_TextBoxWatermarkExtender"
runat="server"
Enabled="True"
TargetControlID="FullName"
WatermarkText="Full Name"
WatermarkCssClass="watermark"
></asp:TextBoxWatermarkExtender>
<asp:RequiredFieldValidator
ID="RequiredFieldValidator2"
runat="server"
ErrorMessage="Must insert full name"
ControlToValidate="FullName"
ForeColor="#FF3300"
SetFocusOnError="True"
></asp:RequiredFieldValidator>
<asp:CustomValidator
ID="CustomValidator2"
runat="server"
ControlToValidate="FullName"
ClientValidationFunction="EmpIDClientValidate"
OnServerValidate="EmpIDServerValidate"
ErrorMessage="CustomValidator"
Display="dynamic"
></asp:CustomValidator>
Now I want the to insert the error message “Must insert full name” into the summary and leave the required control message having this only :”*”. While the summary control should have the full message. Here is my summary control.
<asp:ValidationSummary runat="server" ID="Summary"
ShowMessageBox="true"
HeaderText="<b>Please review the following errors:</b>" ShowSummary="False"
/>
I know it can be done..But I dont know what attribute/property to add to make that happen?
UPDATE:
<asp:RequiredFieldValidator ID="RequiredFieldValidator1"
runat="server"
ErrorMessage="*"
HeaderText="User name is empty"
ControlToValidate="UserName"
ForeColor="#FF3300"
Display="Dynamic"
SetFocusOnError="True"></asp:RequiredFieldValidator>
The control above produces *..which is what I want ..but the summary should take the …”User name is empty” and display it..
Here is the summary again:
<asp:ValidationSummary runat="server" ID="Summary"
ShowMessageBox="true"
HeaderText="<b>Please review the following errors:</b>" ShowSummary="False"
/>
I found what the answer should be:
You should put text..that will represent the error in teh field..and the Error message will be represented in the validation summary control