无法将类型"object"隐式转换为"bool".存在一个显式转换(是否缺少强制转换?)
代码如下:protectedvoidPage_Load(objectsender,EventArgse){if(!IsPostBack){ST_check_Login()...
代码如下:
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
ST_check_Login();
if (Session["ShopCart"] = null) 提示这里错误
{
this.labMessage.Text = "您还没有购物!";
this.labMessage.Visible = true;
this.lnkbtnCheck.Visible = false;
this.lnkbtnClear.Visible = false;
this.lnkbtnContinue.Visible = false;
}
else
{
hashCar = (Hashtable)Session["ShopCart"];
if (hashCar.Count == 0)
{
this.labMessage.Text = "您购物车中没有商品!";
this.labMessage.Visible = true;
this.lnkbtnCheck.Visible = false;
this.lnkbtnClear.Visible = false;
this.lnkbtnContinue.Visible = false;
} 展开
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
ST_check_Login();
if (Session["ShopCart"] = null) 提示这里错误
{
this.labMessage.Text = "您还没有购物!";
this.labMessage.Visible = true;
this.lnkbtnCheck.Visible = false;
this.lnkbtnClear.Visible = false;
this.lnkbtnContinue.Visible = false;
}
else
{
hashCar = (Hashtable)Session["ShopCart"];
if (hashCar.Count == 0)
{
this.labMessage.Text = "您购物车中没有商品!";
this.labMessage.Visible = true;
this.lnkbtnCheck.Visible = false;
this.lnkbtnClear.Visible = false;
this.lnkbtnContinue.Visible = false;
} 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询