Click here to Skip to main content
13,804,175 members
Rate this:
 
Please Sign up or sign in to vote.
See more:
i have create one web services.
that service in one parameter is class.
how to pass postman parameter in class object. 

i have send parameter in x-www-form-urlencoded.
that how to pass class parameter.

What I have tried:

public class strudent
   {
       public string Fname { get; set; }
       public string Lname { get; set; }
       public string data { get; set; }
   }

[WebMethod]
       [ScriptMethod(ResponseFormat = ResponseFormat.Json)]
       public List<strudent> SaveOrder(strudent stud)
       {
           var list=new List<strudent>();
           list.Add(stud);
           return list;
       }
Posted
Updated 11-Dec-18 7:29am
Comments
OriginalGriff 8-Dec-18 8:26am
   
This is not a good question - we cannot work out from that little what you are trying to do.
Remember that we can't see your screen, access your HDD, or read your mind - we only get exactly what you type to work with. So your typing as little as possible really helps no-one...

Use the "Improve question" widget to edit your question and provide better information.

1 solution

Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

Send the object as raw data in JSON form

"student": [
{
"Fname": "FirstName",
"Lname": "LastName",
"data": "data"
}
]
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Cookies | Terms of Service
Web01 | 2.8.181218.1 | Last Updated 11 Dec 2018
Copyright © CodeProject, 1999-2018
All Rights Reserved.
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100