Why this button doesn't cause triple postback?
Posted
by focus
on Stack Overflow
See other posts from Stack Overflow
or by focus
Published on 2010-05-20T11:01:45Z
Indexed on
2010/05/20
11:20 UTC
Read the original article
Hit count: 221
We have developed a page with a asp.net and debugging it accidentally we have discovered on our page button with the next code on onclik attribute
onclick="__doPostBack('ctl00$FormPlace$m_userTaskMarkAsUnreadButton',''); __doPostBack('ctl00$FormPlace$m_userTaskMarkAsUnreadButton','');WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions("ctl00$FormPlace$m_userTaskMarkAsUnreadButton", "", true, "", "", false, false))"
It seems that the button do three postbacks but when we click it only cause on postback. With this code seems that de button will cause three postbacks!!
We have try it with Internet Explorer and Firefox and the button only cause on postback always. Are browsers who avoid that the button do three postback ? Or Is Asp.net server who avoid the three postback? We don't understand why the button behaves correctly if onclick attribute has three call to do Postbacks.
Thanks
© Stack Overflow or respective owner