Here is my code
<div id="AuthenticateUser" runat="server" style="display:block" >
//login control
<asp:button id="ValidateUser" ... />
</div>
<div id="ForceToChangePassword" runat="server" style="display:none" >
//reset password control
</div>
On click of “ValidateUser” button, I do check whether user is valid or not. Based on some condition I do need hide “AuthenticateUser” div tag and show “ForceToChangePassword” div tag.
I really like the jQuery fadeIn/fadeOut effect. I can easily do that on client side. But how can I give that effect after executing server side code?
I tried to call javascript method from code behind that method has a fadeIn/fadeOut logic but it seems like that javaScript method is never been called.
If you have the AJAX extensions, put this in the button event handler. (C# example, easily converted to vb.net)
This will send a client script after the postback has completed. Here is the documentation. This also requires a
ScriptManageron the page. If you don’t have the AJAX extensions you can probably use it from the Page’s method itself.