I think tried that, see below...
Dim adv As UserControl = phSearch.FindCo ntrol(DeptCode)
addqry = adv.Attributes. Item("SearchStr ing")
OR
addqry = CType(adv.FindC ontrol("btnSear ch"), Button).Text
and here's the code I use to put the control into the place holder
Dim srch As UserControl = Page.LoadContro l("~/common/advsrc_" & DeptCode &
".ascx")
srch.ID = DeptCode
phSearch.Contro ls.Add(srch)
And then it errors like so
System.NullRefe renceException: 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******@onlin e.excite.comwro te in message
news:OU******** ******@TK2MSFTN GP02.phx.gbl...
Not sure if I fully understood your question, but to access the dynamic
user
control here is one way:
UserControl x = (UserControl)Pa nel.FindControl ("<ID assigned to the
UC>");
// Use x.<Property Namehere if x is not null
"David Lozzi" <dl****@nospam. nospamwrote in message
news:%2******** ********@TK2MSF TNGP02.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