R
RF
Hi all,
I have an aspx page that was working brilliantly earlier today, and I went
in to change something tiny - the maxlength of a textbox. - and all of a
sudden, the next time I try to access this file, the following error
appeared:
"Object reference not set to an instance of an object."
on Line 1 of my code, which is:
<%@ Page language="c#" Codebehind="Registration.aspx.cs"
AutoEventWireup="false" Inherits="ClientOptin.Registration" %>
Now, I may have made the edit while my page was in debug mode, but I don't
recall. The edit was made in the HTML mode of the page, not the design
mode. Also, I noticed mysteriously that my InitializeComponent function no
longer had anything in it, but my autoeventwireup was still set to false.
I've tried the following things-
* checking my code for a missing tag, other silly errors that I may
have done while making small edit
* readding the body of the InitializeComponent function and setting
autoeventwireup to false
* getting rid of the InitializeComponent function body and setting
autoeventwireup to true
* deleting my .resx file and recompiling
* getting a coworker's .csproj, .sln, and .csproj.webinfo files (on his
project with exact same code and same setup that worked for him) and
replacing mine with
his
* replacing the entire fileset (.aspx, .cs) with fresh copies that my
coworker can run
* getting latest of the last working codebase (which includes these
files in question)
* quitting VS.NET and starting up again,
* closing the project and starting up again.
* Googling to see if anyone else had this problem. No dice.
This same error happens to me when I tried to import a couple of projects
onto my machine. I finally gave up and created a brand new project and
added the old files to it.
Any ideas? I hate it when I can't figure environment issues out and it
slows me down for hours!
Robyn
I have an aspx page that was working brilliantly earlier today, and I went
in to change something tiny - the maxlength of a textbox. - and all of a
sudden, the next time I try to access this file, the following error
appeared:
"Object reference not set to an instance of an object."
on Line 1 of my code, which is:
<%@ Page language="c#" Codebehind="Registration.aspx.cs"
AutoEventWireup="false" Inherits="ClientOptin.Registration" %>
Now, I may have made the edit while my page was in debug mode, but I don't
recall. The edit was made in the HTML mode of the page, not the design
mode. Also, I noticed mysteriously that my InitializeComponent function no
longer had anything in it, but my autoeventwireup was still set to false.
I've tried the following things-
* checking my code for a missing tag, other silly errors that I may
have done while making small edit
* readding the body of the InitializeComponent function and setting
autoeventwireup to false
* getting rid of the InitializeComponent function body and setting
autoeventwireup to true
* deleting my .resx file and recompiling
* getting a coworker's .csproj, .sln, and .csproj.webinfo files (on his
project with exact same code and same setup that worked for him) and
replacing mine with
his
* replacing the entire fileset (.aspx, .cs) with fresh copies that my
coworker can run
* getting latest of the last working codebase (which includes these
files in question)
* quitting VS.NET and starting up again,
* closing the project and starting up again.
* Googling to see if anyone else had this problem. No dice.
This same error happens to me when I tried to import a couple of projects
onto my machine. I finally gave up and created a brand new project and
added the old files to it.
Any ideas? I hate it when I can't figure environment issues out and it
slows me down for hours!
Robyn