日期:2014-05-17  浏览次数:20470 次

新手问题,求高手解答
public partial class Edit : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if(Request["id2"].ToString()!="0")
        {
             a2 a=  MessageService.Get(int.Parse(Request["id2"].ToString()));
             a1.Value = a.t1;
             a2.Value = a.t2;
             a3.Value = a.t3;
             a4.Value = a.t4;
             a5.Value = a.t5;
             a6.Value = a.t6;

        } 
        
    }
}
提示:未将对象引用设置到对象的实例
求高手解答

------解决方案--------------------
晕死。貌似这问题的级别还在“HELLO WORLD”前面。

------解决方案--------------------
判断 Request["id2"]这个是不是为空
------解决方案--------------------
Request中没有id2
------解决方案--------------------
Request["id2"]为null。