I have a aspx page. I have another class and stored procedure. From the aspx page I call a funtion (Term.ShowTerm()) and save data to txtInfo[]. I want to use that info (these variables) after a user reloads the page (a postback -> btnSymptoms_Click for example), but txtInfo resets its value. Is it possible somehow to save these value?
Part of the code:
public partial class dictionaryShowTerm : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
Term.ShowTerm( txtInfo,SqlDataSource1.ConnectionString);
lblInfoAboutCategory.Text = txtInfo[1];
}
}
string[] txtInfo = new string[]
{
"Description",
"Symtoms",
"Causes",
"Treatment",
};
protected void btnSymptoms_Click(object sender, EventArgs e)
{
lblInfoAboutCategory.Text = txtInfo[0];
}
}