D
DFDavis
I currently have information that I am writing to a <div runat="server"
id="hidden_text" /> tag and when the user hits a button, I want to grab
that information so I can store it in a database. However everytime I
try, either with storing it in a session variable or by trying to work
with viewstate, I simply get nothing from either. How can I save this
information so I can actually work with it and put it into my database?
Session sample:
// This is done in a method that I have the init code set up as
the event handler for the button, then after performing this store, I
call the onclick method (actually called button1_click)
Session["test"] = hidden_text.innerHTML;
Onclick ( object sender, EventArgs e)
{
label1.Text = Session["test"].ToString().Trim(); //
just to see if the information is even being stored
}
id="hidden_text" /> tag and when the user hits a button, I want to grab
that information so I can store it in a database. However everytime I
try, either with storing it in a session variable or by trying to work
with viewstate, I simply get nothing from either. How can I save this
information so I can actually work with it and put it into my database?
Session sample:
// This is done in a method that I have the init code set up as
the event handler for the button, then after performing this store, I
call the onclick method (actually called button1_click)
Session["test"] = hidden_text.innerHTML;
Onclick ( object sender, EventArgs e)
{
label1.Text = Session["test"].ToString().Trim(); //
just to see if the information is even being stored
}