javascript - Why does my button output WebForm_DoPostBackWithOptions? - Stack Overflow

I need my page to work when JavaScript has been disabled. But my button is outputting onclick="Web

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 badges
Add a ment  | 

2 Answers 2

Reset to default 2

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" />

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条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信