Reputation: 53
i develop a website with VS2010.I have added a chart from toolbox that displays a line after a button is clicked.But while the chart appears fine the time i press the button, after a PostBack (for example i change the content of a textbox) the chart disappears.How can i make the chart keep showing after a PostBack?
Upvotes: 3
Views: 3859
Reputation: 17083
set EnableViewState="true"
<asp:Chart runat="server" ID="Chart1" EnableViewState="true">
Dunno why but asp.net charts seem to have viewstate off by default
Upvotes: 9