I am using the vs2010 to build a asp.net web application,sometime I want to do some test,so I have to create a new .cs file,but when I click the debug button,the vs will start the whole web application rather than the standlone .cs file.
In java,I use eclipse as my IDE,if I want to do some test in my web applicatio,I just create a new .java which own the “main” method,then I can run this file by “run as java appliation”,so this .java will start.
I wonder if I can do the samething in vs2010?
BTW,how to do some output in the console within vs2010?
In java,within a servlet,I can use the System.out.println("xxx") within the method,when a request comes from the client,the “xxx” will be printed in the console of the eclipse,but in vs when I try "Console.WriteLine("xxx"),there is no output in the vs console, why?
You need to create a new C# project within your solution alongside your ASP.NET project, and if you want console-based output in that C# program, you need to make sure it’s a C# Console Application.
To add a new project to your solution, right-click the solution header in the Solution View, and select “Add Project…”. You should definitely not just insert a
.csfile into your ASP.NET project.