1
votes

I've created a new ASP.NET Web Site in VS2008. I'm attempting to rebuild an old VS.NET application (.NET 1.0). I imported all of the WebForms from the old project (Add Existing items) and I ended up with a ton of errors like:

"The name 'lblMessage' does not exist in the current context"

The partial classes in this project don't have the object definitions for each of the UI elements. I'm hoping there's a way to generate these without having to try to hand-code 500 object definitions.

2
Can't you upgrade solution (.sln file) rather than add old forms into new solution/project?rt2800

2 Answers

1
votes

I ultimately found a workaround for this issue. By manually creating the designer pages ('mypage.aspx.designer.cs') file and then performing an edit on the markup page ('mypage.aspx') Visual Studio will automatically rebuild all the references.

0
votes

Try to use ConvertToWebApplication in Context Menu , WebApplication project file. This will Generated aspx.designer.cs with declaration for controls.