clientscriptmanager

.net - How do you Register a startup script?

I have limited experience with .net. My app throws an error this.dateTimeFormat is undefined which I tracked down to a known ajax bug. The workaround posted said to: "Register the following as a startup script:" Sys.CultureInfo.prototype._getAbbrMonthIndex = function(value) { if (!this._upperAbbrMonths) { this._upperAbbrMonths = this...

ASP.NET master pages order of adding scripts

I have a master page that adds the jquery library via a registerclientscriptinclude: Page.ClientScript.RegisterClientScriptInclude(this.GetType(), "JQuery", Page.ResolveUrl("~/Scripts/jquery-1.2.6.min.js")); In a page that uses that master page I want to include a script that depends on jquery: Page.ClientScript.RegisterCli...

ClientScriptManager.RegisterForEventValidation with HiddenField

I am trying to use to use ClientScriptManager.RegisterForEventValidation to register a hidden field and value that I am adding with ClientScriptManager.RegisterHiddenField. I doing this during the Render event. I get no error, but ASP.NET 2.0 does not appear to be validating the field. I can change the value or delete the entire field...

Unable to RegisterStartupScript from an execution other than Page_Load

I use ScriptManager.RegisterStartupScrit from Page_Load and it works perfect. When I move the same line to the Page_Unload event, it doesn't work; the script is not registered. Any suggestions?? ...

ASP.Net & jQuery - closing a popup

I want to close a ShadowBox popup when the user clicks a button. The popup is showing a separate page in an Iframe. This works fine with a clients-side event on the Cancel button control, e.g. OnClientClick="javascript:parent.Shadowbox.close();" The Ok button, however, has a server-side event, because data needs to be saved. When I de...

Is there a System.Web.UI.ClientScriptManager method that registers scripts inside the <head> tag?

I know it's strictly OK to put <script> tags in the body, but in the interest of neatness I'd like to use System.Web.UI.ClientScriptManager to register a script in the <head> of my page. Is there a method to accomplish this? Thanks in advance. ...