Reputation: 1450
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>
Upvotes: 0
Views: 1657
Reputation: 499052
Javascript runs in the browser, but the __doPostBack
method 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:
div
elements to be server side and set their visibility on the server sidediv
s and in your javascript query it on page load to set the visibilityLinkButton
but some client side markup so a postback doesn't occurUpvotes: 3