Tuesday, September 07, 2010

What are the contents of Service1.asmx

In any version of Visual Studio, when you create a WebService, it comes with a default Service1.asmx file. When you double-click on this file it opens Service1.asmx.cs file for you, why? and what is the content in this file then? and how do you view it?

In order to view what is inside Service1.asmx, select the file in Solution-Explorer, right-click, and choose "Open With..."

From the shown dialog, select the option "Source Code(Text) Editor, click OK, you will see content like this:


These are the instructions Service1.asmx have and so it opens the Service1.asmx.cs, whenever you double-click on Service1.asmx, as its .cs file is the CodeBehind.

No comments:

Post a Comment