When you double click on a class (in 'solution explorer')... if that class happens to be an .asmx.cs webservice... then you get this...
To add components to your class, drag them from the Toolbox and use the Properties window to set their properties. To create methods and events for your class, click here to switch to code view.
...it's a 'visual design surface' for webservices.
(Who actually uses that surface to write webservices?)
So what I want to know, how do I configure visual studio to never show me that design view?
Or at least, to show me the code view by default?
Run the current page in a browser instance inside of Visual Studio. Right-click a blank area of the page and then click View in Browser. The View in Browser command is not available for files that do not render in a browser (such as the Web.
settings is located in the My Project folder for Visual Basic projects and in the Properties folder for Visual C# projects. The Project Designer then searches for other settings files in the project's root folder.
For instance, Visual Studio Code has a "preferences" submenu in its file menu, whereas Visual Studio has most of its options available under "Tools->Options".
You can set the default editor for any given file type (.cs, .xml, .xsd, etc). To change the default editor for a given type:
I don't see the behavior you see with web services, but this should work with all file types in Visual Studio.
Add the following attribute to your class:
[System.ComponentModel.DesignerCategory("Code")]
(Not sure why [System.ComponentModel.DesignerCategory("")] does not work.)
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