I am writing the javascript code to initialize a jquery plugin in my user control from the .ascx.cs file to be able to modify some options when I reload the plugin. Each time the plugin is loaded, I update a div with the new generated code. It is working fine, I can see the code updating but it is not being executed so my plugin does not take in consideration the new options.
ascx file :
<asp:UpdatePanel ID="UpdatePanel3" runat="server" UpdateMode="Always" ChildrenAsTriggers="true">
<ContentTemplate>
<div id="div_js" runat="server">
</div>
</ContentTemplate>
</asp:UpdatePanel>
ascx.cs file :
div_js.InnerHtml = "<script type=\"text/javascript\">"
+ "$(document).ready(function() {"
+ "$('#Grille_" + ID + "').DataTable({ etc ...
So the javascript should be executed when the page finished loading.