It seems that one of my __doPostBack methods (on a LinkButton) is refreshing the javascript on my page… which is causing some of my <div>s to be hidden… any advice on how I can avoid this?
Code:
<asp:LinkButton runat="server" ID="_lnkRefreshImage" OnClick="_lnkRefreshImage_Click" CssClass="refreshImage" CausesValidation="false">Refresh</asp:LinkButton>
Javascript runs in the browser, but the
__doPostBackmethod causes the page to post back to the server – you can’t expect the Javascript to retain state when this happens, not without “help”.You have different options:
divelements to be server side and set their visibility on the server sidedivs and in your javascript query it on page load to set the visibilityLinkButtonbut some client side markup so a postback doesn’t occur