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
Nidadavole Chowdary
NA
28
20.3k
json data to textboxes[server side code]
Apr 17 2014 11:50 PM
hi i am getting the single row json data depending on selection of dropdownlist using web api , i want to bind that data to textboxes.
here is my code. 'insurance_master' is my table
protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
{
string url = "http://localhost:50435/api/Insurance_Master/" + DropDownList1.SelectedValue;
WebRequest req = WebRequest.Create(url);
req.Method = "GET";
// req.Headers.Add("key");
req.ContentType = "application/json; charset=utf-8";
WebResponse resp = req.GetResponse();
Stream stream = resp.GetResponseStream();
StreamReader re = new StreamReader(stream);
String json = re.ReadToEnd();
json = "{\"insurancedetails\":" + json + "}";
wrapper w = (wrapper)new JavaScriptSerializer().Deserialize(json, typeof(wrapper));
}
public class wrapper
{
public List<insurance_master> insurancedetails { get; set; }
}
Help me,
Thanks in advance
Reply
Answers (
3
)
((how)) use linklabel to setup program
Data Filtering