|
|
|
start date: Tue, 14 Aug 2007 12:33:15 -0000,
posted on: microsoft.public.dotnet.framework.aspnet
back
| Thread Index |
|
1
unknown
|
|
2
Eliyahu Goldin
|
|
3
unknown
|
NullReferenceException
Hello,
I have a problem in my code that generates an error with no line
numbers. I know the type of problem that can cause this exception, but
can you think of what could cause it to not return specifically where
in the code the error occurs?
Error:
System.Web.HttpUnhandledException: Exception of type
'System.Web.HttpUnhandledException' was thrown. --->
System.NullReferenceException: Object reference not set to an instance
of an object.
at Assessment_MockRun.LoadQuestion()
at Assessment_MockRun.btnSubmit_Click(Object sender, EventArgs e)
at System.Web.UI.WebControls.Button.OnClick(EventArgs e)
at System.Web.UI.WebControls.Button.RaisePostBackEvent(String
eventArgument)
at
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String
eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler
sourceControl, String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection
postData)
at System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
--- End of inner exception stack trace ---
Thanks in advance,
Max
Date:Tue, 14 Aug 2007 12:33:15 -0000
Author:
|
Re: NullReferenceException
Why don't you set a breakpoint at Assessment_MockRun.LoadQuestion() and step
through all the lines?
--
Eliyahu Goldin,
Software Developer
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net
wrote in message
news:1187094795.015187.91080@q75g2000hsh.googlegroups.com...
> Hello,
> I have a problem in my code that generates an error with no line
> numbers. I know the type of problem that can cause this exception, but
> can you think of what could cause it to not return specifically where
> in the code the error occurs?
>
> Error:
> System.Web.HttpUnhandledException: Exception of type
> 'System.Web.HttpUnhandledException' was thrown. --->
> System.NullReferenceException: Object reference not set to an instance
> of an object.
> at Assessment_MockRun.LoadQuestion()
> at Assessment_MockRun.btnSubmit_Click(Object sender, EventArgs e)
> at System.Web.UI.WebControls.Button.OnClick(EventArgs e)
> at System.Web.UI.WebControls.Button.RaisePostBackEvent(String
> eventArgument)
> at
> System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String
> eventArgument)
> at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler
> sourceControl, String eventArgument)
> at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection
> postData)
> at System.Web.UI.Page.ProcessRequestMain(Boolean
> includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
> --- End of inner exception stack trace ---
>
> Thanks in advance,
> Max
>
Date:Tue, 14 Aug 2007 16:54:08 +0300
Author:
|
Re: NullReferenceException
It's an intermittent bug so I could step through the code many times
and not recreate the error - believe me, I've tried it :P
On Aug 14, 2:54 pm, "Eliyahu Goldin"
wrote:
> Why don't you set a breakpoint at Assessment_MockRun.LoadQuestion() and step
> through all the lines?
>
> --
> Eliyahu Goldin,
> Software Developer
> Microsoft MVP [ASP.NET]http://msmvps.com/blogs/egoldinhttp://usableasp.net
>
> wrote in message
>
> news:1187094795.015187.91080@q75g2000hsh.googlegroups.com...
>
> > Hello,
> > I have a problem in my code that generates an error with no line
> > numbers. I know the type of problem that can cause this exception, but
> > can you think of what could cause it to not return specifically where
> > in the code the error occurs?
>
> > Error:
> > System.Web.HttpUnhandledException: Exception of type
> > 'System.Web.HttpUnhandledException' was thrown. --->
> > System.NullReferenceException: Object reference not set to an instance
> > of an object.
> > at Assessment_MockRun.LoadQuestion()
> > at Assessment_MockRun.btnSubmit_Click(Object sender, EventArgs e)
> > at System.Web.UI.WebControls.Button.OnClick(EventArgs e)
> > at System.Web.UI.WebControls.Button.RaisePostBackEvent(String
> > eventArgument)
> > at
> > System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String
> > eventArgument)
> > at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler
> > sourceControl, String eventArgument)
> > at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection
> > postData)
> > at System.Web.UI.Page.ProcessRequestMain(Boolean
> > includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
> > --- End of inner exception stack trace ---
>
> > Thanks in advance,
> > Max
Date:Tue, 14 Aug 2007 14:32:08 -0000
Author:
|
|
|