User Controls

  • Thread starter Charles A. Lackman
  • Start date
C

Charles A. Lackman

Hello,

I have a user control that is added to a panel on a button click base on
what is inside a dataset. IE

For each Arow in Dataset.Table("Order").Rows
MyControl = LoadControl("OrderControl.ascx")
Page.FindControl("Panel1").Controls.Add(MyControl)
CType(MyControl, OrderControl).ItemID = ARow("ID")
CType(MyControl, OrderControl).Description = ARow("Desc")
CType(MyControl, OrderControl).Department = ARow("Dept")
Next

On the click of a button a new line is added to the dataset and the panel
is refilled with controls (MyControl) (or suposed to). I have to click the
Add Button Twice in order the the control to show up on the page. Any ideas
why this is happening?

Any Suggestions will be greatly appreciated.

Thanks,
Chuck
 
K

Karl Seguin

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

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,142
Latest member
arinsharma
Top