R
rwiegel
I want to dynamically add a custom control to a page in ASP.NET. I
have a custom control called BillControl with public properties for
userID, userName, and Amount.
In the Page_Load of the aspx page, I call a method to dynamically
create however many BillControl controls I need and set the
properties.
In the Page_Load of BillControl.ascx, I call a method to set the text
of the labels and text boxes on the BillControl. I get a
NullReferenceException when I try to run. The label and text box
controls are all null, but I don't understand why.
Can anybody hel?
Thanks,
Ryan
have a custom control called BillControl with public properties for
userID, userName, and Amount.
In the Page_Load of the aspx page, I call a method to dynamically
create however many BillControl controls I need and set the
properties.
In the Page_Load of BillControl.ascx, I call a method to set the text
of the labels and text boxes on the BillControl. I get a
NullReferenceException when I try to run. The label and text box
controls are all null, but I don't understand why.
Can anybody hel?
Thanks,
Ryan