日期:2014-05-17 浏览次数:20553 次
//页面onload方法,通过上一个页面传来的值,判断哪些panel显示,哪些不显示
if (Request.QueryString["index"] != null)
{
if (Request.QueryString["index"].ToString().Equals("2"))
{
Panel1.Visible = false;
Panel2.Visible = true;
}
else if (Request.QueryString["index"].ToString().Equals("3"))
{
//Panel1.Style.display = "none"; 我想设置panel的display为none
Panel3.Visible = true;
}
else if (Request.QueryString["index"].ToString().Equals("4"))
{
Panel1.Visible = false;
Panel4.Visible = true;
}
}
Panel1.Style["display"] = "none";
Panel2.Style["display"] = "block";
Panel3.Style["display"] = "none";