Re: Object reference not set



You still have not shown enough code to enable us to see what's happening.
All I can say is that you should determine which object it is complaining
about: tdBWOM or sb1. Insert some code to verify that both of these
variables are set to the appropriate objects.
You should do this before posting more code. :-)

Bob Barrows
Charlie J wrote:
Here is the line of code:

tdBWOM.InnerHtml = sb1.ToString();

In an attempt to isolate what is happening, I changed the html file
to use a html table instead of an asp:Table. I get the same result.

I cannot get this to fail on my test system, only on the production
server. When the page first displays, the text I put in the cell
displays perfectly. There is no error. Only when I navigate to
another page on the site and then navigate back to this page do I get
the error. If you want to see the aspx page after it is generated,
go to www.mafe.org. It is the home page for the site (default.aspx)
that I am having the problem with. I currently have the line of code
above commented out in the code behind file. --
Charlie Jursch
Patotech Software, Inc.
Danville, CA


"Karl Seguin [MVP]" wrote:

can you show us the line of code that you comment out to make it
work, and all relevant lines of code? Clearly something's null.
It's easy to debug if you step through it and add a breakpoint on
that line...

Karl

--
http://www.openmymind.net/
http://www.fuelindustries.com/


"Charlie J" <CharlieJ@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:F5A9B425-AF2C-45C3-AF7B-DA5DC5CBC3F8@xxxxxxxxxxxxxxxx
I have a real stumper. I added a server side table to a home page
that has two other server side tables on it that have been working
great. In Visual
Studio everything works great. When I put the page on the
production server,
the first time in the page works great. If I navigate to any other
page on
the site and then try to return to the home page the control I added
throws
the following:

Server Error in '/' Application.
------------------------------------------------------------------------
--------

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.]
MAFE.home.LoadBWOM()
MAFE.home.Page_Load(Object sender, EventArgs e)
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +761

If I comment out the line of code where I store a row in the new
table, all
works just fine. Anyone have any ideas?

--
Charlie Jursch
Patotech Software, Inc.
Danville, CA

--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.


.



Relevant Pages

  • Re: Exchange 2003 Mobile Admin
    ... Object reference not set to an instance of an object. ... Please review the stack trace for more information about ... Exception Details: System.NullReferenceException: Object reference not set ... Server Error in '/MobileAdmin' Application. ...
    (microsoft.public.exchange.setup)
  • Please help !!!! Server Error in Application !! Object variable or
    ... We have hosted an asp.net application in a windows 2003 server machine. ... Dim OnlineConnection As New OnlineConnection ... An unhandled exception occurred during the execution of the ... Please review the stack trace for more information about ...
    (microsoft.public.dotnet.framework.aspnet)
  • RE: New website in ISS
    ... The reason I asked here is that it works fine on other server exept SBS 2003 ... Object reference not set to an instance of an object. ... Please review the stack trace for more information about ... Exception Details: System.NullReferenceException: Object reference not set ...
    (microsoft.public.windows.server.sbs)
  • Re: PLEASE HELP - Access is denied: Microsoft.Office.Interop.Owc.
    ... >> includes the OWC both on server and client. ... An unhandled exception occurred during the ... >> using the exception stack trace below. ... Attempting download of new URL ...
    (microsoft.public.office.developer.web.components)
  • Re: Sessions timing out quickly despite very high timeout set in web.config
    ... Exception Details: System.NullReferenceException: Object reference not set to an instance of an object. ... and location of the exception can be identified using the exception stack trace below. ... When reviewing the code from the trace, it always is something that references something in the Session, and my ...
    (microsoft.public.dotnet.framework.aspnet)