i am currently embarking on a project regarding products catalog. I have check box above the image. So whenever, i checked 2 , i want to transfer 2 different Product Id and display 2 images in the next page. However, i am not able to do that. I can only transfer 1 selected image only . is there any way there once i checked 3 checkboxes, it will show me 3 items on the next page? Great help will be appreciated!!
void GetCheckedBox()
{
foreach (DataListItem li in DataList1.Items)
{
selectedProducts = selectedProducts + "," + cb.Value;
LblText.Text = selectedProducts;
Product.Add(selectedProducts);
string url = "CompareProducts.aspx?prodId=" + selectedProducts.Substring(selectedProducts.LastIndexOf(',') + 1);
Response.Redirect(url);
// DataList1.DataBind();
}
}
}
My ProductID is in string form : 0001,0002, 0003
Aucun commentaire:
Enregistrer un commentaire