Reputation: 161
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?
Upvotes: 5
Views: 7095
Reputation: 6864
Not including the ValidationGroup attribute can cause the same issue.
<asp:RequiredFieldValidator ValidationGroup="Save" />
Or the control to validate is incorrect
Upvotes: 1
Reputation: 3401
Validation 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" />
Upvotes: 2