ASP.Net Button not raising postback

梦想的初衷 提交于 2019-12-04 19:29:35

Here's the reason.. and it's a really annoying reason too!

THIS:

<script type="text/javascript" src="../Help/HelpPopup.js" />

Should be THIS:

<script type="text/javascript" src="../Help/HelpPopup.js"></script>

Whoever decided the script tag needs to be treated differently to every other HTML tag, needs to be locked in a room with Justin Bieber.

First off all you should check your Validators and perhabs, comment them out for a test.

Is it possible that there are JavaScript-Errors showing on your page? An ASP-Button is calling a JavaScript-Funktion (WebForm_DoPostBackWithOptions), if there is a JavaScript-Error "before" this line, sometimes you can't press a button.

apparently a client side "return false" is preventing the callback, this could be one of two reasons:

1-the validators always return not valid
2-some client script being called on the button returns false;

At the risk of being down voted for posting an answer to the title question which does not appear to be the OP's problem... I will offer this suggestion which fixed my similar problem:

<body  background="images/GlobeBg.png" bgproperties="fixed">
</body>

Problem is, 'bgproperties' is NOT a valid attribute name even though some guys on the internet said it was. Other than an unnoticed squiggle underline in VWD 2008 Express, no error was emitted and the page otherwise looked normal. Simply, the update button and other input controls didn't work.

The cause for this for me was that a validator on another view in the same page was being fired, due to it being apart of the same validation group.So this prevented the post back.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!