Code:
/ FXUpdate3074 / FXUpdate3074 / 1.1 / DEVDIV / depot / DevDiv / releases / whidbey / QFE / ndp / fx / src / xsp / System / Web / UI / WebControls / ValidatorCompatibilityHelper.cs / 2 / 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. //------------------------------------------------------------------------------ //// 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.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- SoapTypeAttribute.cs
- TextTreeInsertUndoUnit.cs
- TrustLevel.cs
- ComEventsInfo.cs
- XDRSchema.cs
- VersionPair.cs
- Base64WriteStateInfo.cs
- FileLevelControlBuilderAttribute.cs
- XmlSchemaComplexContent.cs
- OrderingQueryOperator.cs
- QilUnary.cs
- QueueProcessor.cs
- CustomBindingElement.cs
- xmlfixedPageInfo.cs
- WebResourceAttribute.cs
- PartManifestEntry.cs
- Root.cs
- ImageIndexConverter.cs
- ClrProviderManifest.cs
- CompareValidator.cs
- Int16Storage.cs
- ButtonBaseAdapter.cs
- ToggleButtonAutomationPeer.cs
- PropertyStore.cs
- AddInAttribute.cs
- ElementMarkupObject.cs
- SynchronizedReadOnlyCollection.cs
- DataViewSetting.cs
- ObjectFullSpanRewriter.cs
- ColorBuilder.cs
- ViewgenContext.cs
- _ListenerAsyncResult.cs
- ValueOfAction.cs
- UdpTransportSettings.cs
- DbConnectionPoolGroupProviderInfo.cs
- BindingExpressionBase.cs
- ScriptControlManager.cs
- TriggerActionCollection.cs
- WebPartDisplayMode.cs
- UserControlFileEditor.cs
- EffectiveValueEntry.cs
- ListArgumentProvider.cs
- DataSourceControl.cs
- EndPoint.cs
- TypeListConverter.cs
- TemplateComponentConnector.cs
- SHA1CryptoServiceProvider.cs
- OverlappedAsyncResult.cs
- bidPrivateBase.cs
- ExportException.cs
- NativeWindow.cs
- XmlSignificantWhitespace.cs
- PersistenceTypeAttribute.cs
- ObjectStateManagerMetadata.cs
- NumericExpr.cs
- PointLightBase.cs
- GetRecipientRequest.cs
- StrictAndMessageFilter.cs
- MasterPage.cs
- Grant.cs
- XmlSchemaImport.cs
- GridViewEditEventArgs.cs
- XsltLoader.cs
- TabItem.cs
- XmlNamedNodeMap.cs
- StatusBar.cs
- METAHEADER.cs
- ToolStripProgressBar.cs
- WeakReference.cs
- HttpServerUtilityBase.cs
- WebPartDisplayModeCancelEventArgs.cs
- WebServiceHandler.cs
- ProfileGroupSettingsCollection.cs
- Panel.cs
- TableLayoutPanelCellPosition.cs
- OnOperation.cs
- SerializationEventsCache.cs
- SynthesizerStateChangedEventArgs.cs
- PhysicalFontFamily.cs
- Encoder.cs
- DataSpaceManager.cs
- OperationDescription.cs
- ServerValidateEventArgs.cs
- StringUtil.cs
- __Error.cs
- HorizontalAlignConverter.cs
- FunctionImportElement.cs
- LongValidatorAttribute.cs
- HoistedLocals.cs
- IOException.cs
- TextClipboardData.cs
- SystemResources.cs
- ObjectDisposedException.cs
- TiffBitmapEncoder.cs
- Classification.cs
- KeyboardNavigation.cs
- PartManifestEntry.cs
- KnownTypesProvider.cs
- DesignTimeResourceProviderFactoryAttribute.cs
- HostExecutionContextManager.cs