Link to home
Start Free TrialLog in
Avatar of andre72
andre72

asked on

Add control programmatically and access it via JavaScript

Hi,

I like to add a control programmatically to a placeholder like:
TextBox tx = new TextBox();
tx.ID = "myControl";
myPlaceholders.Controls.Add(tx);

Works fine and is not the problem.

But when I place a control fix at my page I can access it from JavaScript like $find(<%= myControl.ClientID %>);
This works no more with the programmatically way.
How can I access it in this way?

Thanks

Andre
ASKER CERTIFIED SOLUTION
Avatar of Solar_Flare
Solar_Flare

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of andre72
andre72

ASKER

Thanks for your support