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
- PrincipalPermission.cs
- FlowLayout.cs
- GridViewCancelEditEventArgs.cs
- TypeElement.cs
- ManagementObjectSearcher.cs
- Pens.cs
- FilePrompt.cs
- SamlEvidence.cs
- EncryptedReference.cs
- DataKey.cs
- ContextMenuStripActionList.cs
- SRGSCompiler.cs
- XmlTextReaderImplHelpers.cs
- LeaseManager.cs
- RSACryptoServiceProvider.cs
- SafeNativeMethods.cs
- CacheEntry.cs
- StorageConditionPropertyMapping.cs
- RtfNavigator.cs
- PseudoWebRequest.cs
- ObjectDataSourceStatusEventArgs.cs
- ProfileModule.cs
- XmlLoader.cs
- ObfuscateAssemblyAttribute.cs
- EntityCommand.cs
- SafeNativeMethodsCLR.cs
- StylusLogic.cs
- ColorContextHelper.cs
- TaiwanCalendar.cs
- WizardStepBase.cs
- XpsSerializationManager.cs
- VectorAnimationUsingKeyFrames.cs
- PageSettings.cs
- LocationSectionRecord.cs
- ConnectionPoint.cs
- DocumentViewerAutomationPeer.cs
- PerfCounters.cs
- TableLayoutRowStyleCollection.cs
- SchemaImporterExtensionsSection.cs
- XmlILStorageConverter.cs
- DbParameterHelper.cs
- MouseActionValueSerializer.cs
- DataServiceQueryContinuation.cs
- WebPartDisplayMode.cs
- WinEventQueueItem.cs
- AnnotationComponentManager.cs
- GenericIdentity.cs
- MdiWindowListStrip.cs
- TypeConverterHelper.cs
- AnimationTimeline.cs
- ApplicationGesture.cs
- documentation.cs
- AttributeAction.cs
- Html32TextWriter.cs
- SettingsProperty.cs
- WindowsTitleBar.cs
- ThemeDictionaryExtension.cs
- URLMembershipCondition.cs
- ProcessThread.cs
- ApplicationActivator.cs
- HotSpotCollectionEditor.cs
- DateRangeEvent.cs
- ImageAttributes.cs
- WebServiceReceiveDesigner.cs
- ObjectDataSourceView.cs
- Size.cs
- GraphicsState.cs
- FragmentQueryKB.cs
- Stackframe.cs
- ColumnResult.cs
- AudioSignalProblemOccurredEventArgs.cs
- NameValuePair.cs
- WebPartUserCapability.cs
- VirtualPathUtility.cs
- ContourSegment.cs
- ListViewItem.cs
- FlowPosition.cs
- SchemaDeclBase.cs
- SqlCacheDependencySection.cs
- PerCallInstanceContextProvider.cs
- FrameworkTemplate.cs
- StartUpEventArgs.cs
- CompilationUnit.cs
- BitmapData.cs
- GroupBoxAutomationPeer.cs
- RoleManagerEventArgs.cs
- ButtonColumn.cs
- MaskInputRejectedEventArgs.cs
- HtmlInputReset.cs
- XmlCompatibilityReader.cs
- WmlMobileTextWriter.cs
- SortKey.cs
- SelfIssuedTokenFactoryCredential.cs
- FusionWrap.cs
- TextServicesCompartmentContext.cs
- DashStyles.cs
- OdbcError.cs
- CannotUnloadAppDomainException.cs
- ExpandButtonVisibilityConverter.cs
- InputScope.cs