|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Detecting if client-side validation javascript is registered?What is the correct way to determine if javascript for client-side validation
has been registered in ASP.NET 2.0? I'm trying to debug a control that uses the following to detect: bool bIsRegistered = Page.IsStartupScriptRegistered("ValidatorIncludeScript"); This works fine for ASP.NET 1.x, but not for 2.0. Can anyone tell me the correct way please? Thanks Ben
http://msdn2.microsoft.com/en-us/library/fdwe5ca7(VS.80).aspx
Show quoteHide quote "Ben Fidge" wrote: > What is the correct way to determine if javascript for client-side validation > has been registered in ASP.NET 2.0? > > I'm trying to debug a control that uses the following to detect: > > bool bIsRegistered = Page.IsStartupScriptRegistered("ValidatorIncludeScript"); > > This works fine for ASP.NET 1.x, but not for 2.0. Can anyone tell me the > correct way please? > > Thanks > > Ben Phillip,
Thanks for that. I had already looked there but it transpires that I was using the Page.ClientScript.IsStartupScriptRegistered method wrong. I was using: Page.ClientScript.IsStartupScriptRegistered(this.GetType(), "ValidatorIncludeScript"); but it should have been Page.ClientScript.IsStartupScriptRegistered(typeof(BaseValidator), "ValidatorIncludeScript"); Regards Ben Show quoteHide quote "Phillip Williams" <WEBSWAPP@newsgroups.nospam> wrote in message news:D4412A2E-807F-4A00-AC02-6B5FB7D03403@microsoft.com... > http://msdn2.microsoft.com/en-us/library/fdwe5ca7(VS.80).aspx > -- > HTH, > Phillip Williams > http://www.societopia.net > http://www.webswapp.com > > > "Ben Fidge" wrote: > >> What is the correct way to determine if javascript for client-side >> validation >> has been registered in ASP.NET 2.0? >> >> I'm trying to debug a control that uses the following to detect: >> >> bool bIsRegistered = >> Page.IsStartupScriptRegistered("ValidatorIncludeScript"); >> >> This works fine for ASP.NET 1.x, but not for 2.0. Can anyone tell me the >> correct way please? >> >> Thanks >> >> Ben
GridView w/ ObjectDataSource w/ Business object layer
GridView, ObjectDataSOurce, and enum parameter for select Web UserControl (ascx) and UrlProperty attribute Gridview custom sort - works but always sorts ascending Perform insert to gridview/table DropDownlist problem Datalist formatting questions Adding client side code to RadioButtonList control item??? Treeview SelectedNodeChanged event not firing GridView custom control and post back issues |
|||||||||||||||||||||||