Jquery - add server control
- by superexsl
Hey,
I'm having trouble with a custom control and adding it dynamically using JQuery. I've got the following code:
$('.custom_control_div').replaceWith(
"<div><cc:mycustomcontrol id='cControl' ></cc:mycustomcontrol></div>"
);
This doesn't throw any errors, but doesn't work because I need to use runat=server in my custom control. However, if I add runat=server in the code above, no javascript is executed on the page (and jqueryUI no longer works). The custom control works fine when I add it directly to the page from design-time.
Is there a way to add a control, with runat=server using Jquery?
Thanks