Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VS modifies my code and breaks it. 1

Status
Not open for further replies.

qwert231

Programmer
Sep 4, 2001
756
US
In my page declaration line, I need to set this:
Code:
Inherits="lRollReorder"
for my page to work, but VS keeps changing it to:
Code:
Inherits="localhost.lRollReorder"
which gives me the error:
The base type 'localhost.lRollReorder' does not exist in the source file 'lRollReorder.aspx.vb'.


Also, I have experienced times where, switching from Design view to HTML view quickly, I lose some of my form, and if I save, well... you can imagine how frustrating it is to have half of a web form disappear, cause then, when you try to recreate it, you get messages like 'This id is already used...' or whatnot. VS, you are bugging me today.
 
I don't doubt it. I am working on a VB.NET app and VS will forget declarations that it made in the "Windows Form Designer generated code". And the other day it could not find my base form that all my other forms are inherited from (which it worked for months before that and about six hours latter it found it (I did nothing)).

There are some serious problems with VS.NET, but your problem with losing code has to be the worst I have heard about.

Kris
[noevil]
 
sounds to me like you need to fix your root namespace, which you can do on the properties of the project...

You can either set it to blank (and it won't put anything in front i.e. localhost) or you can set it to the name of your project, and it'll put that name there:

nameOfProject.nameOfClass

either way should work.

I would suggest the project name, just so you don't get namespace collisions. The only exception to this heuristic would be when you're writing base classes to place on your webserver that many different projects will call. In this case, I would suggest constructing your own namespaces, and killing the defaults that vs likes to set for you (i.e. the project name)

hth
paul
penny1.gif
penny1.gif
 
K, I'll do that. As far as the other losing of code/controls... well... let's see when the patches/service packs start coming.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top