0

ASP NET C# using System.Windows.Form namespace producce error "The type or namespace name 'Windows' does not exist in the class or namespace 'System' (are you missing an assembly reference?)".

I test it with WinXP ver 2002 SP3, MS Visual Studio Microsoft Development Enviroment 2002 ver 7, framework 2.0; and with Win7Professional, MS Visual Studio 2008 Express, framework 3.5 (inside Win7?)

1
  • this is happening at compile time, right? Commented Jan 18, 2011 at 0:54

2 Answers 2

3

Add a reference to System.Windows.Forms in the visual studio by right-clicking the references or project in the solution explorer.

But I could not figure out what it has got to do with ASP.NET?

Sign up to request clarification or add additional context in comments.

Comments

0

Are you trying to create web or desktop application? You can't use both within a single project.
If you want to create a new desktop application, you can do it by selecting:

File -> New -> Project -> Visual C# -> Windows - Windows Forms Application

2 Comments

You can use both just fine. Just add a reference to System.Windows.Forms and go with it. Whether this is a good idea or not is an entirely different question :)
Yes, you can create new windows forms controls from code behind, but VS won't let you to use any Windows Forms templates inside a web project :)

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.