Passing values with session and adding to session one each page

Chaoss

New Member
I need to store the values entered in \[code\]textBox's\[/code\] and \[code\]dropdownList's radio buttons\[/code\].... My form is a multi paged form.Im not sure what im doing but this is what im thinking.I have a button that clicks to the next page. I have made a class with everyfield in the DB table i want to insert too. On the button click event i want to assign the values to the \[code\]session\[/code\]. Is this how I would do it?\[code\]protected void img_btnNext_Click(object sender, ImageClickEventArgs e){Incident obj = new Incident();obj.witnessesYes = rad_ReportYes.Checked;obj.witnessesNo = rad_ReportNo.Checked;// lots more objects .... to valuesSession["mySession"] = obj;Response.Redirect("~/Communicating.aspx");}\[/code\]so when I go to the next page do I just carry on ? adding more values to the \[code\]obj\[/code\] and adding it to \[code\]session\[/code\]? Im not sure how to do this.
 
Back
Top