2
Answers

How we insert session value into table

munish kumar Kumar

munish kumar Kumar

12y
2.6k
1
I want insert session value into table how it will we possible by this code

 if (Session["EmailID"] != null)
        {
            String sid, sname;
            sid = ddlSubjects.SelectedItem.Value;
            sname = ddlSubjects.SelectedItem.Text;
            Examination exam = new Examination(Session["EmailID"].ToString(), Int32.Parse(sid), sname);  // Problem here
            exam.GetQuestions();
            Session.Add("questions", exam);
            Response.Redirect("examination.aspx");
        }

Answers (2)