1
Answer

Silverlight developing creating 5 user controls

srikiran nelli

srikiran nelli

14y
2.3k
1

Hi Friends,
Can you help to develop this kind of scenario.
I need to develop  a user control ( like address control which  has drop downs and text boxs). From the code behind I may need to create   some times 5 controls  somes times 3 controls.
Well  the user enters  data into 5 user controls , and the user controls fileds like countries  and states , i need to get from the data base. Well user enters data into text boxes and  selects the  country and  states.
So  i have 5 user controls in the page , at this instant , if user clicks save button then  the corrsopinding data should be updated to 2 different tables.
Thanks in advance
 
 
Answers (1)
0
ashish jaiman

ashish jaiman

NA 60 0 14y

Yes you can easily achieve this

1)      Create an stackflow in code

2)      Add controls to the stackflow (in this case 5 text boxes) or 3 depending on what you need

3)      Add an event handler in the textbox lost focus

4)      Add code in the above event handler to go to a web service (you can use WCF RIA Services) and fetch the data from database

5)      To update database you again have to use Web Service as from Silverlight you do not get access to the data base directly and the database is on the server has to be accessed by WCF or ASP.NET.