且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

为什么OnBeforeUnload与ASP射击两次:LinkBut​​ton的?

更新时间:2023-02-05 20:39:40

我也有类似的问题,但是,我并不想火onbeforeunload为LinkBut​​tons可言,所以我用了每一个LinkBut​​ton的上下面的.aspx页:

I had a similar problem, however, I didn't want to fire onbeforeunload for LinkButtons at all, therefore I used the following for every LinkButton on the .aspx page:

OnClientClick="eval(this.href);return false"

在LinkBut​​tons的功能并未被削弱,因为他们所做的一切与CommandArgument提供命令为codebehind处理...

Functionality of the LinkButtons wasn't crippled, since all they did was supplying a Command with CommandArgument for the codebehind to handle...