private void UserControl_Loaded(object sender, RoutedEventArgs e) { WebClient wc = new WebClient(); wc.OpenReadCompleted += new OpenReadCompletedEventHandler(wc_OpenReadCompleted); wc.OpenReadAsync(new Uri("http://localhost:49520/Products/Index/")); } void wc_OpenReadCompleted(object sender, OpenReadCompletedEventArgs e) { DataContractJsonSerializer json = new DataContractJsonSerializer(typeof(List<Product>)); IList<Product> result = (List<Product>)(json.ReadObject(e.Result)); MyGrid.ItemsSource = result; } }
Tuesday, January 29, 2013
MVC 3 and Silverlight 4 db passing
Labels:
ASP.NET Web,
Silverlight
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment