Hello
My Code
protected void RadioButton1_CheckedChanged(object sender, EventArgs e)
{
RadioButton rb1 = null;
RadioButton rb2 = null;
RadioButton rb3 = null;
RadioButton rb4 = null;
RadioButton rb5 = null;
RadioButton rb6 = null;
foreach (DataListItem item in dlDisplayAll.Items)
{
rb1 = (RadioButton)item.FindControl("RadioButton1");
rb2 = (RadioButton)item.FindControl("RadioButton2");
rb3 = (RadioButton)item.FindControl("RadioButton3");
rb4 = (RadioButton)item.FindControl("RadioButton4");
rb5 = (RadioButton)item.FindControl("RadioButton5");
rb6 = (RadioButton)item.FindControl("RadioButton6");
if (rb1.Checked == true)
{
Session["Size"] = "Small";
}
else if (rb2.Checked == true)
{
Session["Size"] = "Medium";
}
else if (rb3.Checked == true)
{
Session["Size"] = "Large";
}
else if (rb4.Checked == true)
{
Session["Size"] = "XL";
}
else if (rb5.Checked == true)
{
Session["Size"] = "XXL";
}
else if (rb6.Checked == true)
{
Session["Size"] = "XS";
}
}
}
and in viewcart.cs file
str11 += "
<input type='Text' id='size" + cnt1 + "' value=" + Session["Size"].ToString() +" readonly> |
";
now when i add one item in cart it display all information with size id etc. now i continue shopping and add new item in cart than size of both item gone same because i used Session[Size] one session now how i can do size with it's product id