How to trigger jquery after postback in ASP.NET

How to trigger jquery after postback in ASP.NET

Hi,

I made a form in ASP.NET & created login div inside it (initially login div is hidden). Once I click on "Sign In" button, I manage to toggle the sign in div visibility.
Now my question is when it is successful login, I am redirecting the user to a new page & this is running fine. But when login is failed, I want to keep sign in box open (however it is not straight forward as it executes server side code & page reloads, hence the box is hidden). Can you please suggest me best approach considering performance factor whether I should call jquery & open the sign in div from server code OR it can be done using jquery only OR is there any standard way to deal with such situation. Any help will be appreciated.

Thanks