TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Prasad Bhagat
NA
516
236.4k
how to create web service with request and responce in josn?
Aug 27 2015 6:51 AM
Dear all,
i want create a web service that will send the data and recives the data in json,
when i was create a web service it will autometically tacking soap formatt for post operation please expline me how to pass data in json formatt using sql stored procedures .please help me .
my operation like bellow
[webmethod]
public string savedata(string name,string city,string country ,string pin)
{
sqlconnection conn=new sqlconnection(connection object);
sqlcommand cmd=new sqlcommand("sp_register",conn);
cmd.commandtype=commandtype.stroredprocedure;
cmd.parameters.addwithvalue("@name",name);
cmd.parameters.addwithvalue("@city"city);
cmd.parameters.addwithvalue("@country"country);
string STATUSMSG = (string)cmd.ExecuteScalar();
return new JavaScriptSerializer().Serialize(STATUSMSG);
}
by defalut am getting post operation in soap formatt i need to change it into json please help me
Reply
Answers (
1
)
USSD webservice - C#
How to provide security in .net web service.?