Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > "Object reference not set to an instance of an object." error at postback

Reply
Thread Tools

"Object reference not set to an instance of an object." error at postback

 
 
louie.hutzel@gmail.com
Guest
Posts: n/a
 
      06-20-2006
This JUST started happening, I don't remember changing any code:
When I click the submit button on my form, stuff is supposed to happen
(which it does correctly) and a result message is posted back to the
same page at the top of my form alerting the user that their request
has been approved or denied. However, the end result is an error
message:

Error Message:
Object reference not set to an instance of an object.

Error Stack:
System.NullReferenceException: Object reference not set to an instance
of an object.
at System.Web.UI.Control.OnBubbleEvent(Object source, EventArgs
args)
at System.Web.UI.WebControls.Button.OnCommand(Command EventArgs e)
at
System.Web.UI.WebControls.Button.System.Web.UI.IPo stBackEventHandler.RaisePostBackEvent(String
eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler
sourceControl, String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection
postData)
at System.Web.UI.Page.ProcessRequestMain()


As you can see, there no reference to any line of code, when I step
thru it, everything gets executed as it should. Data that is to be
saved to the database is saved. The error message appears immediately
after the last 'end sub', and all code is executed. It only seems
to happen when a page is supposed to post back to itself.

I started erasing code for the button, all of it, until all the code
that was left for the button was "end sub," and it still drew the
same error. However, when I put a Response.Redirect() statement in the
code, it redirects to the new page properly. Also there is no Page_Load
code for the page (it starts as an empty form).

Under a "locals" observation while running the program, I noticed
that under the 'me' watch, the "binding container" value =
<error: an exception of type: {System.NullReferenceException}
occurred>. I don't know what this means, or if that's the problem.

 
Reply With Quote
 
 
 
 
jeffmagill@gmail.com
Guest
Posts: n/a
 
      06-20-2006
Louie,

My guess would be that your problem is located with your binding
container that you mentioned towards the end of your post.

Could you post your code the parts of your code that are relevant?

Jeff


wrote:
> This JUST started happening, I don't remember changing any code:
> When I click the submit button on my form, stuff is supposed to happen
> (which it does correctly) and a result message is posted back to the
> same page at the top of my form alerting the user that their request
> has been approved or denied. However, the end result is an error
> message:
>
> Error Message:
> Object reference not set to an instance of an object.
>
> Error Stack:
> System.NullReferenceException: Object reference not set to an instance
> of an object.
> at System.Web.UI.Control.OnBubbleEvent(Object source, EventArgs
> args)
> at System.Web.UI.WebControls.Button.OnCommand(Command EventArgs e)
> at
> System.Web.UI.WebControls.Button.System.Web.UI.IPo stBackEventHandler.RaisePostBackEvent(String
> eventArgument)
> at System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler
> sourceControl, String eventArgument)
> at System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection
> postData)
> at System.Web.UI.Page.ProcessRequestMain()
>
>
> As you can see, there no reference to any line of code, when I step
> thru it, everything gets executed as it should. Data that is to be
> saved to the database is saved. The error message appears immediately
> after the last 'end sub', and all code is executed. It only seems
> to happen when a page is supposed to post back to itself.
>
> I started erasing code for the button, all of it, until all the code
> that was left for the button was "end sub," and it still drew the
> same error. However, when I put a Response.Redirect() statement in the
> code, it redirects to the new page properly. Also there is no Page_Load
> code for the page (it starts as an empty form).
>
> Under a "locals" observation while running the program, I noticed
> that under the 'me' watch, the "binding container" value =
> <error: an exception of type: {System.NullReferenceException}
> occurred>. I don't know what this means, or if that's the problem.


 
Reply With Quote
 
 
 
 
Louie
Guest
Posts: n/a
 
      06-21-2006
I don't know what to say.

I came into work today, ran my program and it had no errors. I'm
thinking the problem must have been a server issue on my workstation
and it resolved it self with a system reboot. I'll post my code if I
get the error again, but I'm not sure how it would help; Yesterday, I
troubleshot the problem down to only white space between the sub and
end-sub statements, and it still drew an error.

But all seems to be running smooth this morning... so far.

Thanks
Louie

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
"Object reference not set to an instance of an object" Weird thing happens with reference a link nguyentrongkha@gmail.com ASP .Net 1 09-20-2007 09:46 PM
Error:Object reference not set to an instance of an object. Suresh Kojhani ASP .Net 1 07-29-2004 12:10 PM
Error !Object reference not set to an instance of an object. !!! Help Parthiv Joshi ASP .Net 2 07-02-2004 10:28 AM
"Object reference not set to an instance of an object" error Lauchlan M ASP .Net 1 08-18-2003 01:32 PM
HELP! Error Loading ASPX : Object Reference not set to an instance object Pedro Correia ASP .Net 0 07-25-2003 10:42 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57