Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / xsp / System / Web / UI / WebControls / ValidatorCompatibilityHelper.cs / 1305376 / ValidatorCompatibilityHelper.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.UI.WebControls { using System.Globalization; using System.Reflection; using System.Web.Util; // Needed to support Validators in AJAX 1.0 (Windows OS Bugs 2015831) internal static class ValidatorCompatibilityHelper { public static void RegisterArrayDeclaration(Control control, string arrayName, string arrayValue) { Type scriptManagerType = control.Page.ScriptManagerType; Debug.Assert(scriptManagerType != null); scriptManagerType.InvokeMember("RegisterArrayDeclaration", BindingFlags.Public | BindingFlags.Static | BindingFlags.InvokeMethod, null, /*binder*/ null, /*target*/ new object[] {control, arrayName, arrayValue}); } public static void RegisterClientScriptResource(Control control, Type type, string resourceName) { Type scriptManagerType = control.Page.ScriptManagerType; Debug.Assert(scriptManagerType != null); scriptManagerType.InvokeMember("RegisterClientScriptResource", BindingFlags.Public | BindingFlags.Static | BindingFlags.InvokeMethod, null, /*binder*/ null, /*target*/ new object[] {control, type, resourceName}); } public static void RegisterExpandoAttribute(Control control, string controlId, string attributeName, string attributeValue, bool encode) { Type scriptManagerType = control.Page.ScriptManagerType; Debug.Assert(scriptManagerType != null); scriptManagerType.InvokeMember("RegisterExpandoAttribute", BindingFlags.Public | BindingFlags.Static | BindingFlags.InvokeMethod, null, /*binder*/ null, /*target*/ new object[] {control, controlId, attributeName, attributeValue, encode}); } public static void RegisterOnSubmitStatement(Control control, Type type, string key, string script) { Type scriptManagerType = control.Page.ScriptManagerType; Debug.Assert(scriptManagerType != null); scriptManagerType.InvokeMember("RegisterOnSubmitStatement", BindingFlags.Public | BindingFlags.Static | BindingFlags.InvokeMethod, null, /*binder*/ null, /*target*/ new object[] {control, type, key, script}); } public static void RegisterStartupScript(Control control, Type type, string key, string script, bool addScriptTags) { Type scriptManagerType = control.Page.ScriptManagerType; Debug.Assert(scriptManagerType != null); scriptManagerType.InvokeMember("RegisterStartupScript", BindingFlags.Public | BindingFlags.Static | BindingFlags.InvokeMethod, null, /*binder*/ null, /*target*/ new object[] {control, type, key, script, addScriptTags}); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.UI.WebControls { using System.Globalization; using System.Reflection; using System.Web.Util; // Needed to support Validators in AJAX 1.0 (Windows OS Bugs 2015831) internal static class ValidatorCompatibilityHelper { public static void RegisterArrayDeclaration(Control control, string arrayName, string arrayValue) { Type scriptManagerType = control.Page.ScriptManagerType; Debug.Assert(scriptManagerType != null); scriptManagerType.InvokeMember("RegisterArrayDeclaration", BindingFlags.Public | BindingFlags.Static | BindingFlags.InvokeMethod, null, /*binder*/ null, /*target*/ new object[] {control, arrayName, arrayValue}); } public static void RegisterClientScriptResource(Control control, Type type, string resourceName) { Type scriptManagerType = control.Page.ScriptManagerType; Debug.Assert(scriptManagerType != null); scriptManagerType.InvokeMember("RegisterClientScriptResource", BindingFlags.Public | BindingFlags.Static | BindingFlags.InvokeMethod, null, /*binder*/ null, /*target*/ new object[] {control, type, resourceName}); } public static void RegisterExpandoAttribute(Control control, string controlId, string attributeName, string attributeValue, bool encode) { Type scriptManagerType = control.Page.ScriptManagerType; Debug.Assert(scriptManagerType != null); scriptManagerType.InvokeMember("RegisterExpandoAttribute", BindingFlags.Public | BindingFlags.Static | BindingFlags.InvokeMethod, null, /*binder*/ null, /*target*/ new object[] {control, controlId, attributeName, attributeValue, encode}); } public static void RegisterOnSubmitStatement(Control control, Type type, string key, string script) { Type scriptManagerType = control.Page.ScriptManagerType; Debug.Assert(scriptManagerType != null); scriptManagerType.InvokeMember("RegisterOnSubmitStatement", BindingFlags.Public | BindingFlags.Static | BindingFlags.InvokeMethod, null, /*binder*/ null, /*target*/ new object[] {control, type, key, script}); } public static void RegisterStartupScript(Control control, Type type, string key, string script, bool addScriptTags) { Type scriptManagerType = control.Page.ScriptManagerType; Debug.Assert(scriptManagerType != null); scriptManagerType.InvokeMember("RegisterStartupScript", BindingFlags.Public | BindingFlags.Static | BindingFlags.InvokeMethod, null, /*binder*/ null, /*target*/ new object[] {control, type, key, script, addScriptTags}); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- ApplicationDirectory.cs
- XamlBuildTaskServices.cs
- SQLResource.cs
- BlurEffect.cs
- XpsDigitalSignature.cs
- CodeArrayCreateExpression.cs
- HttpProfileBase.cs
- CompatibleIComparer.cs
- FileDocument.cs
- HebrewNumber.cs
- Transform3DGroup.cs
- RegisteredArrayDeclaration.cs
- SerializationStore.cs
- DbConnectionInternal.cs
- CodePageUtils.cs
- LogEntrySerialization.cs
- AmbientValueAttribute.cs
- SettingsPropertyNotFoundException.cs
- XPathEmptyIterator.cs
- IndentedTextWriter.cs
- RichTextBox.cs
- XmlTypeAttribute.cs
- AnchorEditor.cs
- GridEntry.cs
- SqlDataSourceFilteringEventArgs.cs
- Token.cs
- PropertyGrid.cs
- DeobfuscatingStream.cs
- OutputScopeManager.cs
- LinqDataSourceSelectEventArgs.cs
- MSAAWinEventWrap.cs
- FastPropertyAccessor.cs
- WindowVisualStateTracker.cs
- DrawingContext.cs
- DigitalSignatureProvider.cs
- SectionInformation.cs
- Brush.cs
- CqlParserHelpers.cs
- XDeferredAxisSource.cs
- Path.cs
- JavaScriptSerializer.cs
- RemotingServices.cs
- DPTypeDescriptorContext.cs
- StreamGeometryContext.cs
- DirectionalLight.cs
- TagMapCollection.cs
- Model3D.cs
- ChannelBase.cs
- PersistenceTask.cs
- GradientBrush.cs
- IndexedString.cs
- FilteredReadOnlyMetadataCollection.cs
- VisualStyleTypesAndProperties.cs
- Timer.cs
- DecoderReplacementFallback.cs
- TextModifierScope.cs
- SafeNativeMethods.cs
- ConnectionManagementElementCollection.cs
- CharStorage.cs
- DataObjectEventArgs.cs
- PseudoWebRequest.cs
- XPathAncestorIterator.cs
- ManipulationStartedEventArgs.cs
- BaseTemplateBuildProvider.cs
- SymLanguageType.cs
- SpotLight.cs
- DefaultProfileManager.cs
- EncodingStreamWrapper.cs
- FontFamily.cs
- SHA512CryptoServiceProvider.cs
- RegionIterator.cs
- SetterBase.cs
- SqlTrackingQuery.cs
- WinEventTracker.cs
- SpeechSynthesizer.cs
- WebPartTransformer.cs
- XPathDocument.cs
- VerbConverter.cs
- CodeCompiler.cs
- basecomparevalidator.cs
- DocumentGridContextMenu.cs
- ConfigPathUtility.cs
- ConsoleTraceListener.cs
- CodeSnippetStatement.cs
- WindowClosedEventArgs.cs
- StylusPlugInCollection.cs
- QueryProcessor.cs
- InvokePattern.cs
- XmlILOptimizerVisitor.cs
- ConnectionProviderAttribute.cs
- FileUtil.cs
- StateMachine.cs
- PolicyValidationException.cs
- PipeException.cs
- SQLBytes.cs
- IntSecurity.cs
- SQLUtility.cs
- WmiEventSink.cs
- XmlName.cs
- DataSourceView.cs