473,224 Members | 1,643 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,224 software developers and data experts.

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

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.

Jun 20 '06 #1
2 2945
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
lo**********@gmail.com 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.


Jun 20 '06 #2
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

Jun 21 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Bob Cannistraci | last post by:
A three-tier user authentication system was running without a problem for almost a year and now is suddenly dysfunctional. We don't know of any changes to any of the servers. It's quite maddening....
2
by: tJ | last post by:
Hi I'm working on a form with a splitControl. In the RHS panel2, I need to add a panel to drop radioButtons onto. But when i do this, I get the following error message: "Object reference not...
1
by: Chris Magoun | last post by:
I suddenly received an unexpected error in my project. I have been working on this project for some time without this issue. Nothing has changed in the form that caused the exception. A little...
18
by: Microsoft | last post by:
When I try this in my code I alwas get an errormessage: "Object reference not set to an instance of an object" Dim g As System.Drawing.Graphics g.DrawString("Test", New Font("Arial", 12,...
1
by: Gummy | last post by:
Hello, I've been banging my head against the wall for a few days on this. When I run a page, either in "View in Browser" or I actually build the solution, I occasionally and very randomly get...
35
by: Chris | last post by:
Hi, I tried to create a class which must change the propety 'visible' of a <linktag in the masterpage into 'false' when the user is logged. But i get the error: "Object reference not set to an...
0
by: Tamer Ibrahim | last post by:
Hi, Sometimes, I got the following error message when I use ajax calendar control on some aspx pages : Object reference not set to an instance of an object. Description: An unhandled exception...
4
by: My Pet Programmer | last post by:
Ok guys, I'm really looking for someone to tell me how bad a hack this is, and if I'm close to where I should be with it. The basic situation is that I have a class which creates a basic...
2
by: snester | last post by:
Hi, I am using visual studio 2005 and recently created a new web service project. I seem to have edited the global config file (inadvertently) somewhere along the line. All new projects I...
0
by: VivesProcSPL | last post by:
Obviously, one of the original purposes of SQL is to make data query processing easy. The language uses many English-like terms and syntax in an effort to make it easy to learn, particularly for...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
0
by: mar23 | last post by:
Here's the situation. I have a form called frmDiceInventory with subform called subfrmDice. The subform's control source is linked to a query called qryDiceInventory. I've been trying to pick up the...
2
by: jimatqsi | last post by:
The boss wants the word "CONFIDENTIAL" overlaying certain reports. He wants it large, slanted across the page, on every page, very light gray, outlined letters, not block letters. I thought Word Art...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.