?
Solved

ASP.NET 4.0 web page moved from web site to web project doesn't work

Posted on 2011-09-19
5
Medium Priority
?
392 Views
Last Modified: 2013-11-27
Hello experts,
I have a "web site" that I created in Visual Studio that I want to convert into a "web project" in Visual Studio 2010. I created the "web project" in a new location and then moved my .aspx and .aspx.cs files into that new location and added them/included into my project from Visual Studio and set it as my start page.

The problem is that the controls on the aspx page (for example: lblUploadStatus) are not recognized from my .cs page. I'm getting "The name lblUploadStatus does not exist in the current context."

Does anyone know how to fix? I was working fine in my "web site". Also I noticed that I don't have a .aspx.designer.cs file. Is that part of the problem? Thanks. error message screen shot
0
Comment
Question by:dpicco
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 18

Accepted Solution

by:
Ajay Sharma earned 2000 total points
ID: 36565005
0
 
LVL 12

Expert Comment

by:Ramkisan Jagtap
ID: 36565937
Hi,
I faced the same problem some time before. Only solution I fould at that time was to create new pages in new web project and then copy paste the code  from old pages to new pages. Actully its irritating process if you have too many files to add. But you can give a try. I don't know if there is a valid process suported by visual studio.

Regards,
Ram
0
 
LVL 21

Expert Comment

by:tovvenki
ID: 36566281
Hi,
what happens when you try to build/rebuild the project?

Regards,
Venki
0
 
LVL 3

Author Closing Comment

by:dpicco
ID: 36566744
Thanks. I just had to right click on each file inside VS2010 and convert to web application
0
 
LVL 3

Author Comment

by:dpicco
ID: 36566752
After selecting convert to web application, VS2010 will recreate the designer.cs file for you.
0

Featured Post

Veeam Task Manager for Hyper-V

Task Manager for Hyper-V provides critical information that allows you to monitor Hyper-V performance by displaying real-time views of CPU and memory at the individual VM-level, so you can quickly identify which VMs are using host resources.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Color can increase conversions, create feelings of warmth or even incite people to get behind a cause. If you want your website to really impact site visitors, then it is vital to consider the impact color has on them.
Without even knowing it, most of us are using web applications on a daily basis.  In fact, Gmail and Yahoo email, Twitter, Facebook, and eBay are used by most of us daily—and they are web applications. We generally confuse these web applications to…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

718 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question