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
- OrderingQueryOperator.cs
- ToolBarButton.cs
- TextServicesLoader.cs
- AvTrace.cs
- ResizeGrip.cs
- EntityContainer.cs
- XmlCharacterData.cs
- ValueQuery.cs
- ReflectionUtil.cs
- webproxy.cs
- SafeViewOfFileHandle.cs
- ConfigXmlDocument.cs
- ConsumerConnectionPoint.cs
- ValidationHelper.cs
- DataGridHelper.cs
- ADConnectionHelper.cs
- NavigatingCancelEventArgs.cs
- GiveFeedbackEvent.cs
- HttpCookiesSection.cs
- DesignerForm.cs
- ConnectionStringSettings.cs
- filewebresponse.cs
- SpecularMaterial.cs
- XmlNamedNodeMap.cs
- wgx_render.cs
- MaskedTextBox.cs
- OutputCacheProfileCollection.cs
- __Filters.cs
- WmlCalendarAdapter.cs
- EntityClientCacheEntry.cs
- HttpCapabilitiesSectionHandler.cs
- MD5CryptoServiceProvider.cs
- SqlUDTStorage.cs
- Configuration.cs
- TableLayoutStyleCollection.cs
- SafeSerializationManager.cs
- SwitchLevelAttribute.cs
- Comparer.cs
- Binding.cs
- NetworkStream.cs
- odbcmetadatafactory.cs
- DataServiceExpressionVisitor.cs
- CriticalHandle.cs
- StaticFileHandler.cs
- NetworkStream.cs
- ChildrenQuery.cs
- AutoGeneratedFieldProperties.cs
- SafeFileHandle.cs
- BitmapPalette.cs
- MsmqSecureHashAlgorithm.cs
- MaskedTextBox.cs
- HttpCapabilitiesSectionHandler.cs
- DescendantOverDescendantQuery.cs
- TextHintingModeValidation.cs
- StartUpEventArgs.cs
- TableParagraph.cs
- DateTimeOffsetStorage.cs
- basenumberconverter.cs
- NullableDoubleAverageAggregationOperator.cs
- CodeThrowExceptionStatement.cs
- TextHidden.cs
- TitleStyle.cs
- DataControlFieldCollection.cs
- RequestCacheEntry.cs
- MultiByteCodec.cs
- MasterPageParser.cs
- PasswordRecovery.cs
- CultureInfo.cs
- UInt32.cs
- ScrollableControl.cs
- Object.cs
- Viewport2DVisual3D.cs
- ChannelSinkStacks.cs
- DataTableCollection.cs
- GraphicsState.cs
- WaitHandleCannotBeOpenedException.cs
- DBDataPermission.cs
- DataGridViewCellLinkedList.cs
- EmptyReadOnlyDictionaryInternal.cs
- ExtensionWindowResizeGrip.cs
- TypedTableBaseExtensions.cs
- AppDomainManager.cs
- EdmType.cs
- LongSumAggregationOperator.cs
- xmlfixedPageInfo.cs
- ConstructorExpr.cs
- ProxySimple.cs
- RequestQueryParser.cs
- PlatformNotSupportedException.cs
- Matrix3DValueSerializer.cs
- ConfigXmlWhitespace.cs
- CodeTypeReference.cs
- Form.cs
- RijndaelManagedTransform.cs
- SettingsContext.cs
- TextRangeEdit.cs
- BufferedGraphicsManager.cs
- Style.cs
- InputScopeConverter.cs
- NameValueSectionHandler.cs