I need to update the data on my server.
- I need to
GET
the data - And need to store it in a TextBox
- Then I need to perform my Update operation.
I'm able to GET
the data from server but unable to display it in the text box
MY in XAML code:
<Grid x:Name="ContentPanel" Margin="12,157,12,4" Grid.RowSpan="2">
<TextBlock HorizontalAlignment="Left" Height="30" Margin="20,67,0,0" TextWrapping="Wrap" Text="Name" VerticalAlignment="Top" Width="65"/>
<TextBox x:Name="txt_name" HorizontalAlignment="Left" Height="73" Margin="121,42,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="315" BorderThickness="0" InputScope="PersonalFullName"/>
</Grid>
My code to retrieve data from server on page load:
private async void PhoneApplicationPage_Loaded(object sender, RoutedEventArgs e)
{
String OrganizationResult;
if (NavigationContext.QueryString.ContainsKey("selectedItem"))
{
OrganizationResult = NavigationContext.QueryString["selectedItem"];
string[] content = OrganizationResult.Split(',');
string value = content[0];
String id = value.Replace("{ id = ", "");
Organization[] org;
org = await client.searchOrganizationdetails(id);
if (org != null)
{
var query = from c in org
select new
{
// Need to display the contents in textbox
// Eg:txt_name.Text=c.name
};
}
}
}
My sample JSON data: