How can an asp.net project by pulling in a code-behind class from another project?

M

moondaddy

I have a vb.net asp 1.1 project where when I step through the code behind of
a page, a new codebehind with the same name appears in the IDE and executes.
so now I have 2 classes open in the IDE with the same name
(BasePage.aspx.vb) I had another project open at the same time which has a
page with the same name (BasePage.aspx) and somehow it got pulled into the
first project. Even after I close both projects and re-open the first one
again it pulls in this other class and executes. I saw this once before and
it was a real hassle to solve. Can anyone tell me what's going on here and
a good way to fix it?
 
L

Landi

It's showing in the class browser?
I might not be understanding the question, but why not just delete if it is
a duplicate?

--Landi
 
S

Steven Cheng[MSFT]

Hi Moondaddy,

From your description, when you're debuging a web page in VS.NET and step
through the webpage 's code, you found the VS.NET IDE open another
codebehind file(with same name) in another project which is also opened
into the current project, yes? If anything I'm misunderstand, please feel
free to tell me.

As for the problem does it occur if there hasn't a codebehind in another
opened project and the filename is the same? Also, does it occur both in
vb.net or c# project?
Thanks.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx
 
M

moondaddy

I think it starts happening when there's another project open with the same
page and code in it (projV1 and projV2). Then after I close the 2nd project
it still happens and even if I reboot the computer it will continue to
happen when I put a break point in the same code behind. When the 2nd
codebehind from the 2nd project appears again in my main project, I can't
delete it because its not in solution explore, all I can do is close its
window. It will keep appearing. very bizarre.
 
S

Steven Cheng[MSFT]

Hi Moondaddy,

Thanks for your followup. As you mentioned that the problem will remain
even if we close the IDE? And the only means you can do is to close the
window. Does the "window" you mentioned means the tab on the top of the
VS.NET ide? Then, would you try closing all the opened source window(aspx
or code behind) in project and then save and close the IDE, restart again
to see whether the problem occur?
Thanks.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,733
Messages
2,569,439
Members
44,829
Latest member
PIXThurman

Latest Threads

Top