How to add a [WebMethod] file for WebService1.asmx ?

daowdos 296 Reputation points
2021-08-01T15:50:16.48+00:00

I have a project with server side in C# and SQL Server
I'm connected to the SQL Server and want to pass it parameters to a table.

How do I open a WebMethod file ? I can't find it
neither a WebService project.

119529-webmethod.png

ASP.NET Core Web API - is not the right way , because I figured that I can't send parametrs to the SQL from the browser.

Windows for business | Windows Server | User experience | Other
Developer technologies | ASP.NET | Other
Developer technologies | C#
{count} votes

1 answer

Sort by: Most helpful
  1. Duane Arnold 3,216 Reputation points
    2021-08-01T19:57:13.187+00:00

    There is no such thing as a Webmethod file. You can add a classname.cs to the project the class can contain WebMethod(s) in the class.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.