Click here to Skip to main content
15,919,245 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
how do I bind a "UserID" textbox in XAML to a Sql Server database table name "People" with attribute "ID" (Integer),to open a new page using the attribute ID as UserID?
Posted

1 solution

Are you using MVVM . if so then in the view model create the property with name UserId

C#
public int32 UserId{ get{...} set {...}}


then in viewmodel call methods like wcf/webservice or sql call and get the data and assign it to the property UserId you created.

Then in the XAML page :

C#
<textbox text="{Binding UserId}" />


And I think you will get what you want.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900