Im trying to write a quick console app that outputs data to an HTML file, however im having trouble accessing the System.Web.UI namespace.
Adding System.Web to my references places a warning icon on top of the reference name in the solution explorer and System.Web is not available in the .NET reference list (in order for me to actually add it to the project I have to go to the object browser and add it from there).
Anybody have any ideas about what I could be missing?
Thanks alot people!
WebControls Namespace. Contains classes that allow you to create Web server controls on a Web page. Web server controls run on the server and include form controls such as buttons and text boxes.
System. Web. UI represents an . aspx file, also known as a Web Forms page, requested from a server that hosts an ASP.NET Web application. The Page class is associated with files that have an .
After Googling around a little bit I found that the common answer to this question was to add a reference to System. Web. dll by finding it in the list presented by right-clicking on References in the Solution Explorer and clicking "Add Reference...".
In Visual Studio 2010 the default target framework for Console Applications is ".NET Framework 4 - Client Profile" which doesn't include System.Web. Change it in the project properties to just '.NET Framework 4' and you can add the reference.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With