To some this could be stupid question. But here's the deal. I have asp.net web application and I use jquery to call functions inside *.aspx.cs files that have [WebMethod] attri开发者_如何学Pythonbute attached to them. I had no clue that [WebMethod] is mainly using in web services. I never have worked with web services and I saw I can add .asmx file to my project. So from application architecture point of view where should I use and how can I use .asmx files, and if is it mistake to have [WebMethod] attribute inside *aspx.cs files. Thanks :D:D
Unless you're stuck using .NET 2.0, you shouldn't do either one. .asmx files are now considered by Microsoft to be a "legacy technology". All new web service development should use WCF. See https://stackoverflow.com/tags/wcf/info.
you are rushing for a solution. it not that simple, read articles returned by a search term such as "asp.net web service" or "wcf web services"
and decide how you want to proceed
it will take some time to understand, say one to two weeks..
精彩评论