473,396 Members | 2,129 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,396 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 2959
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.