473,382 Members | 1,329 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,382 software developers and data experts.

OT? : IDE-induced coding error?

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


Nov 16 '05 #1
1 1151
RF
So, I got my project to work again, and the solution was strange : I got
rid of the AutoEventWireup declaration in the Page directive, recompiled,
ran it (it didn't work, as expected) and then put it back again, and things
worked fine. Who knows...

Damn editor! :-)
"RF" <rf*****@getridofthis.yahoo.com> wrote in message
news:ef*************@TK2MSFTNGP12.phx.gbl...
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

Nov 16 '05 #2

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

Similar topics

8
by: C. Alexander | last post by:
Im running a small server that seems to work fine outside the IDE as an exe, but within the IDE, when I run the program for the first time, i can start/stop the host many times. But I end the...
121
by: typingcat | last post by:
First of all, I'm an Asian and I need to input Japanese, Korean and so on. I've tried many PHP IDEs today, but almost non of them supported Unicode (UTF-8) file. I've found that the only Unicode...
2
by: Johann Blake | last post by:
I can hardly believe I'm the first one to report this, but having gone through the newsgroup, it appears that way. I would like to open a solution in the VS.NET IDE that consists of multiple...
10
by: Andrew Baker | last post by:
I have just found a very serious bug in the way Visual Studio interfaces with Clearcase... I found that once you have opened a code file in the IDE, the IDE caches this file and does not re-read...
3
by: Rolf Molini | last post by:
Hello board, I just started looking into C# - programming and find it quite applicable for very rapid development scenarios. But the handy support that the IDE provides has now run me into...
1
by: Rolf Molini | last post by:
Hello everybody, I put this in a separate thread because altough it is connected to the localization-problem in my former thread this is a completely different "joke" of the IDE. While waiting...
5
by: Lloyd Sheen | last post by:
After formatting killed the control. I delete it. Add it new. Can I change the name so that all existing code will work. Not a chance. Somewhere the old name exists. I guess this IDE only...
13
by: Lloyd Sheen | last post by:
I am out of my mind fighting with the IDE HTML editor. Beyond the fact that reformatting the text is brain dead (and I am not just talking about the switching from design to HTML). I am putting...
3
by: chris | last post by:
Hallo, I am in need of a replacement for the Microsoft Visual Studio .NET. The reason is quiet simple. I develop forms which are used on different microsoft windows platform, and one...
7
by: Anthony | last post by:
Hi, I'm a FoxPro programmer, but I want to learn python before it's too late. I do a lot of statistical programming, so I import SPSS into python. In my opinion, the best features of Visual...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.