Dec 31, 2011

how to pass a JavaScript object to a .NET webservice that expects a parameter of type object.

Introduction

This article shows how to pass a JavaScript object to a .NET webservice that expects a parameter of type object. JSON is an enormously powerful and lightweight way to send data to and from a webservice, however if there are a number of parameters that are needed to be sent to webservice, building a JSON string can be a pain, and having to set your webmethod to expect a matching number of parameters can be equally as painful. This article shows how to build and pass a JavaScript object "Customer" and pass it to a .NET webservice webmethod that is expecting an object of type "Customer".

for more click on below link
http://smartprogrammingspot.blogspot.com/2010/06/javascript-objects-to-net-webmethods.html

No comments:

Post a Comment

What is the use of n-tier architecture and 3-tier architecture?

how to implement 3-tier architecture in asp.net using c#. 3-Tier architecture is also called layered architecture. Some people called it ...