asp.net错误 求帮忙Label3.Text = Session[ GoodsCity ].ToString();
public partial class _Default : System.Web.UI.Page{ Common com = new Common(); protected void Page_Load(object sender, EventArgs e) { if (String.IsNullOrEmpty((String)System.Web.HttpContext.Current.Session["GoodsCity"])) { Label3.Text = Session["GoodsCity"].ToString();//使用“new”关键字创建对象实力;在调用方法前通过检查确定对象是否为null } DataTable table = com.paihangProduct(Session["GoodsCity"].ToString()); if (table.Rows.Count != 0) { DataList1.DataSource = table; DataList1.DataBind(); } } protected void productdel(object source, DataListCommandEventArgs e) { if (e.CommandName == "describe") { string goodsid = e.CommandArgument.ToString(); Response.Redirect("productdescribe.aspx?GoodsID=" + goodsid); } }