错误如下:
未将对象引用设置到对象的实例。
说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。 异常详细信息: System.NullReferenceException: 未将对象引用设置到对象的实例。源错误:
行 176: Lusertype.Text += ObjResume.USERTYPE = usertype.Value;
行 177:
行 178: string PicFilePath = picture.PostedFile.FileName;行 178: string PicFilePath = picture.PostedFile.FileName;是红色的代码如下:
string PicFilePath = picture.PostedFile.FileName;
string PicTrueFilePath = Server.MapPath("uploadpics//");
string PicFileName = PicFilePath.Substring(PicFilePath.LastIndexOf("\\") + 1);
picture.PostedFile.SaveAs(PicTrueFilePath + PicFileName);
在其它页面用可以,但我拿到这个页面就不行,为什么呀?
未将对象引用设置到对象的实例。
说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。 异常详细信息: System.NullReferenceException: 未将对象引用设置到对象的实例。源错误:
行 176: Lusertype.Text += ObjResume.USERTYPE = usertype.Value;
行 177:
行 178: string PicFilePath = picture.PostedFile.FileName;行 178: string PicFilePath = picture.PostedFile.FileName;是红色的代码如下:
string PicFilePath = picture.PostedFile.FileName;
string PicTrueFilePath = Server.MapPath("uploadpics//");
string PicFileName = PicFilePath.Substring(PicFilePath.LastIndexOf("\\") + 1);
picture.PostedFile.SaveAs(PicTrueFilePath + PicFileName);
在其它页面用可以,但我拿到这个页面就不行,为什么呀?
是空引用
检查一下时不时那个picture
picture.posetedfile.saveas(server.mappath("uploadpics/") & system.io.path.GetFileName(picture.postedfile.filename))
end if
大概这样...这样可以得到其他panel里的空间...