3

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?

Josh
  • 53
  • 1
  • 7

1 Answers1

9

set EnableViewState="true"

<asp:Chart runat="server" ID="Chart1" EnableViewState="true">

Dunno why but asp.net charts seem to have viewstate off by default

Androiderson
  • 16,865
  • 6
  • 62
  • 72