pass data from dataset to usercontrol

S

Sandeman

I have a usercontrol with some textboxes in it. The usercontrol is called
Personal and the first textbox in it txtName.

After the click button event i call some data and fill in in a dataset
DSAccounts.

Personal.txtName.Text= DSAccounts.Tables("Accounts").Rows(0).Item("Name")

When i do it this way i get the ''ASP.Personal_ascx.txtName' is not
accessible in this context because it is 'Protected'.

What do i do wrong? And does anyone have a solution?

Thanks in advance
 
A

Alessandro Zifiglio

hi Sandeman, can you provide some more details and code sample.
Specificially i want to know if you are loading the usercontrol dynamically
or if you added this at designtime. I want to see how you declared your
usercontrol in your codebehing to access its properties etc.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top