No postback to any button by clicking on an ASP.NET 4.0 application.

It's strange if there is javascript onClick () on the button, postback works otherwise, there is no postback. It has been working recently. I am not sure that recent changes to the application have done this throughout the site. The solution proposed by this link also does not work (this link is applicable to .NET 1.1, though). Any idea what is going on?

EDIT: -

There is no postback if I have a button like this: -

<asp:button id="btnClick" runat="server" onClick="Click"/>

Returns when I have a button similar to this one and I see that the Click event handler code is triggered: -

<asp:button id="btnClick" runat="server" onClientClick="return Test();" onClick="Click"//>

and the corresponding JS function, which simply returns true at the end: -

function Test()
{
return true;
}
+3
source share
2

- ? , .

0

, - ? - script ?

0

Source: https://habr.com/ru/post/1738615/


All Articles