I need to pass an object as a parameter to the web service web method..i have no issues doing that.. the problem i am facing is.. i need to know from where i should pass the values of the class
for example i have a class person which has 2 attributes firstname and lastname..
i am passing this person object to the webmethod something like
[webmethod]
public string setData(Person p)
{
//insert firstname and last name to database
}
now my question is from where can i assign values to the person class so that i can get it into the database?
Thanks
I think you should pass the values through the class to webservice. And you can extract values from the class and send to the database query. This will give you more efficiency over adding and removing parameters.