How to update record in windows phone 8

36 Views Asked by At

I am developing windows phone 8 app. I am having textbox and buttons and image in listbox. When I added data to above columns then on click on button I am saving data in windows azure. This is working fine. when I click on image I am geting its index and all values related to it. Now i can change these values if wants. and when click on button update query should get fire for selectes index. How to find update query for selected index in WINDOWS PHONE 8 when click on button I want to fire update queryfor updating values of textbox in windows azure database.

1

There are 1 best solutions below

0
AudioBubble On

IMobileServiceTable table = App.MobileService.GetTable();

var account = table.Where(o=>o.YOUR_INDEX_FIELD).Take(1).ToListAsync();

List list = await account; list[0].VALUE1= VALUE_OF_TEXTBOX;

await table.UpdateAsync(list[0]);

Add async keyword when defining the class for particular table.