Multiple choice technology web technology

How will you avoid postback for a button on client side?

  1. OnClick call a server function

  2. retun false on OnClick

  3. return true on OnClientClick

  4. return false on OnClientClick

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

In ASP.NET, the OnClientClick property allows you to run JavaScript before the postback. If the JavaScript function returns 'false', the server-side click event (postback) is cancelled.