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

daowdos 266 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.

ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
3,288 questions
Windows Server
Windows Server
A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.
12,205 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,309 questions
{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.