You can do a Page.FindContro l("CONTROL_ID") ;
note though that this isn't a recursive find (like client-side
getElementById( )
for example, say the control you wanted was inside a placeholder:
<asp:placeholde r id="plc" runat="server">
<asp:dropdownli st id="ddl" runat="server">
</asp:placeholder >
rather, you'll need to eitehr nest them:
Page.FindContro l("plc").FindCo ntrol("ddl")
or base it off the parent control:
ddlontrol.FindC ontrol("ddl")
of course, if the control isn't nested, you can just do
Page.FindContro l("ControlId" ) and ignore everything I said except the first
line (Which is the same as this line!!)
Karl
--
MY ASP.Net tutorials
http://www.openmymind.net/ http://openmymind.net/redirector.aspx?documentId=51 - Learn about AJAX!
"Kamal Ahmed" <mh********@yah oo.com> wrote in message
news:ex******** ******@TK2MSFTN GP09.phx.gbl...
Hi all,
I want to execute a String that is generated at Runtime and fills data in
DropDownList Controls at Runtime. I want to do this at server side. As
Eval functions works as client side function and there is not other
function or command to do this
example is here..
("ddlSub" & CStr(nRow) & ".DataSourc e = dtrSubject")
I want to evaluate this string to get name of control at runtime e.g.
ddlSub1, ddlSub2, ddlSub3 and so on
How it will be done using Asp.Net 1.1 using Vb.Net ?
TIA