now, the error message will display if I move out of current textbox. I don't want to display it until I click submit button.
相关问题
- Carriage Return (ASCII chr 13) is missing from tex
- How to store image outside of the website's ro
- 'System.Threading.ThreadAbortException' in
- Request.PathInfo issues and XSS attacks
- How to dynamically load partial view Via jquery aj
相关文章
- asp.net HiddenField控件扩展问题
- asp.net HiddenField控件扩展问题
- Asp.Net网站无法写入错误日志,测试站点可以,正是站点不行
- asp.net mvc 重定向到vue hash字符串丢失
- FormsAuthenticationTicket expires too soon
- “Dynamic operations can only be performed in homog
- What is the best way to create a lock from a web a
- Add to htmlAttributes for custom ActionLink helper
Set the
forecolor
property of the validator to the background color of your page. Then in theonclientclick
of the submit button, change the csscolor
property to the desired color:Try this one for creating dynamic radio buttons along with required field validators...
This isn't possible when ClientScript is enabled for your validators. And the ClientScript is by default enabled for your validators. You need to disable this by settings EnableClientScript to False in your source.
Now in the event handler of your submit button call Page.Validate() and Page.IsValid to see if every validators did pass the test.
Example:
You could set
CausesValidation="False"
for the button for which you don't want validation to happen.Use a validation summary control somewhere on your page...
<
asp:validationsummary id="valSummary" runat="server" headertext="Validation Errors:" cssclass="ValidationSummary" />
Then to validate:
Remove the "*" if you don't want immediate feedback... the errormessage is displayed in the
<asp:validationsummary>
control when you submit the form.Normally it appears only when you enter text, delete it again and then move out of the textbox. I think this is by design. Try to change EnableClientScript property.