注册 登录
编程论坛 ASP技术论坛

求助! 测试代码出现错误

b3b4 发布于 2010-04-13 11:30, 338 次点击
做代码测试时出现下列错误信息,望能提供错误原因及解决方法,谢谢!
Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[NullReferenceException: Object reference not set to an instance of an object.]
   LuckBet._Default2.Page_Load(Object sender, EventArgs e) +226
   System.Web.UI.Control.OnLoad(EventArgs e) +99
   System.Web.UI.Control.LoadRecursive() +50
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627

2 回复
#2
gupiao1752010-04-13 11:31
你这个帖子应该发。NET区去吧。发错地方了!
#3
yms1232010-04-13 16:19
NullReferenceException
充分说明未实例化对象就使用的错误,也就是空引用。
LuckBet._Default2.Page_Load(Object sender, EventArgs e) +226
错误发生在这个页面的226行代码上。
1