我有一个针对每种音乐类型形成的数组列表,例如我将展示乡村音乐:
public class CountryItemList
{
ArrayList CountryItems = new ArrayList();
protected void CountryBuy1_Click(object sender, ImageClickEventArgs e)
{
CountryItems.Add("Johnny Cash - I Walk The Line - $9");
}
protected void CountryBuy2_Click(object sender, ImageClickEventArgs e)
{
CountryItems.Add("Carrie Underwood - Blown Away - $9");
}
protected void CountryBuy3_Click(object sender, ImageClickEventArgs e)
{
CountryItems.Add("Keith Urban - The Story So Far - $9");
}
protected void CountryBuy5_Click(object sender, ImageClickEventArgs e)
{
CountryItems.Add("Taylor Swift - Red - $11");
}
protected void CountryBuy6_Click(object sender, ImageClickEventArgs e)
{
CountryItems.Add("Willie Nelson - Legend - $9");
}
}
}
对于单击的每个购买按钮,所选专辑将添加到数组列表中,从那时起,我希望将数组列表带入会话并将其带到“购物车页面”上的列表框中。我在获取数组列表并将其设置为会话以延续到下一页时遇到问题