Reputation: 527
I have an HTML page, it has a contact form I want to send the data with AJAX
I was trying to send the data to webservice without changing the structure of the data to JSON and no success.
Is this the way to do it or there is another recommended way?
The pages are in the same server and folder another question: what is the diffrence between writing a webservice in aspx page to asmx page?
If there is anyother info you need just tell me
thanks!
Upvotes: 0
Views: 363
Reputation: 2008
It is a common practice to send data to web service as JSON. it is possible to send it as XML as well, though i have not used it before.
You cant write a web service in aspx page, you write only static web methods in aspx pages.
If you want your web methods to be reusable and to be accessed from external systems, write it in asmx. else , it is ok to write them in aspx pages itself if it is for use in your application only.
Upvotes: 1