I need my page to work when JavaScript has been disabled. But my button is outputting onclick="WebForm_DoPostBackWithOptions...". When I set CauseValidation="false" it disappears but I need validation. In what circumstances is WebForm_DoPostBackWithOptions outputted? And how can I get around this problem?
I need my page to work when JavaScript has been disabled. But my button is outputting onclick="WebForm_DoPostBackWithOptions...". When I set CauseValidation="false" it disappears but I need validation. In what circumstances is WebForm_DoPostBackWithOptions outputted? And how can I get around this problem?
Share Improve this question asked Dec 13, 2010 at 18:20 Junior DeveloperJunior Developer 1612 silver badges7 bronze badges2 Answers
Reset to default 2Validation controls use both Client and Server validation. On the client, javascript is used for validation, and is required.
You can force validation controls to not use client script, which might help you with this issue.
<asp:RequiredFieldValidator EnableClientScript="false" />
Not including the ValidationGroup attribute can cause the same issue.
<asp:RequiredFieldValidator ValidationGroup="Save" />
Or the control to validate is incorrect
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744768478a4592610.html
评论列表(0条)