I think tried that, see below...
Dim adv As UserControl = phSearch.FindControl(DeptCode)
addqry = adv.Attributes.Item("SearchString")
OR
addqry = CType(adv.FindControl("btnSearch"), Button).Text
and here's the code I use to put the control into the place holder
Dim srch As UserControl = Page.LoadControl("~/common/advsrc_" & DeptCode &
".ascx")
srch.ID = DeptCode
phSearch.Controls.Add(srch)
And then it errors like so
System.NullReferenceException: Object reference not set to an instance of an
object.
I'm guessing the Attributes.Item is not right to get a Property but I
figured I should be able to get the serach button....
Thanks!!
David
"Siva M" <sh******@online.excite.comwrote in message
news:OU**************@TK2MSFTNGP02.phx.gbl...
Not sure if I fully understood your question, but to access the dynamic
user
control here is one way:
UserControl x = (UserControl)Panel.FindControl ("<ID assigned to the
UC>");
// Use x.<Property Namehere if x is not null
"David Lozzi" <dl****@nospam.nospamwrote in message
news:%2****************@TK2MSFTNGP02.phx.gbl...
Howdy,
I'm using a PlaceHolder to dynamically display a user control based on a
users selection. This part works great. However how do I get to the
properties of that user control? I have public properties setup but I dont
know how to access that use control...
Thanks!!
David