Declare and add Custom Controls programmatically to a panel
hi guys
I have 13 custom controls (.ascx) which each hold diff forms for data to be
captured to a db.
These forms get displayed if they have been assigned to a certain sub-category
ie. user assigns 2 forms to sub-category, both forms then display under that sub
and uset can capture the data.
now the repeater to list the forms sits inside a 3rd-level repeater.
the order of repeaters:
Code:
category
- subcategory
- specs
- forms
here's the code that populates the 'forms' repeater:
Code:
Dim myForms As FormsList = New FormsList
myParams.OrderBy = "name ASC"
myParams.FormID = hdn_formID.Value
myForms = FormsManager.GetListByID(myParams)
rpActiveSpecification.DataSource = myForms
rpActiveSpecification.DataBind()
now in my 'forms' repeater's OnItemDataBound I want to add my custom
controls to a panel inside the repeater.
this is what i'm not sure of, normally you would declare a control like so:
Code:
Dim pnl As Panel = e.item.findcontrol("pnl")
but not sure how that works for a custom control?
Shem
Shem, September 22nd, 2008 11:12 AM
Bookmarks