Skip to main content

Posts

Showing posts with the label javascript

RegisterStartupScript updated way to right Java script JS (Javascript) in code behind also work with update panel

Dear All RegisterStartupScript is obsolete now the new way that works with update panel  is given below its is code behind file code also VB Code Dim csname1 As String = "PopupScript" Dim cstype As Type = Me.GetType() Dim cs As ClientScriptManager = Page.ClientScript Dim cstext1 As String = "alert('Your message');" cs.RegisterStartupScript(cstype, csname1, cstext1, True) C# Code String csname1 = "PopupScript"; Type cstype = this.GetType(); ClientScriptManager cs = Page.ClientScript; String cstext1 = "alert('Hello World');"; cs.RegisterStartupScript(cstype, csname1, cstext1, true); I hope it will help you also  Regards  Rashid Imran Bilgrami

Javascript not working when enable the AJAX in DNN or .net

Dear All, Today i found a solution finally to rebind the Javascript issue with support partially run with DNN Here is the key <script type="text/javascript">     function BindControlEvents() {         //jQuery is wrapped in BindEvents function so it can be re-bound after each callback.         //Your code would replace the following line:             $('#<%= TextProtocolDrugInstructions.ClientID %>').limit('100', '#charsLeft_Instructions');             }     //Initial bind     $(document).ready(function () {         BindControlEvents();     });     //Re-bind for callbacks (This is a key)     var prm = Sys.WebForms.PageRequestManager.getInstance();     prm.add_endRequest(function() {         BindControlEvents();     }); </script> ...