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
- TextMetrics.cs
- ToolStripContainerDesigner.cs
- AppDomainProtocolHandler.cs
- CompilationUtil.cs
- BasicCellRelation.cs
- SqlCacheDependencySection.cs
- PartialCachingControl.cs
- SemanticValue.cs
- NetStream.cs
- SiteMapNodeItem.cs
- MessageFilterTable.cs
- CalendarButtonAutomationPeer.cs
- PropertyGridDesigner.cs
- InvalidDataException.cs
- GenericAuthenticationEventArgs.cs
- BrowserCapabilitiesCodeGenerator.cs
- ProcessHostServerConfig.cs
- PropertyDescriptorCollection.cs
- ControlBuilder.cs
- CompoundFileStorageReference.cs
- DriveInfo.cs
- ColorMap.cs
- SerializationHelper.cs
- EditorZone.cs
- PeerNameResolver.cs
- activationcontext.cs
- RuntimeArgumentHandle.cs
- FunctionDetailsReader.cs
- SQLDecimalStorage.cs
- MouseWheelEventArgs.cs
- ExeContext.cs
- SupportingTokenChannel.cs
- InstanceKeyCompleteException.cs
- EntityContainerAssociationSet.cs
- TableProviderWrapper.cs
- ReadOnlyCollection.cs
- ClientSideQueueItem.cs
- OptimizedTemplateContentHelper.cs
- ClientFormsIdentity.cs
- Single.cs
- DeviceSpecificDialogCachedState.cs
- _TLSstream.cs
- PenLineJoinValidation.cs
- RegexNode.cs
- basemetadatamappingvisitor.cs
- DbConnectionStringCommon.cs
- EventLogPermissionEntryCollection.cs
- ProxyManager.cs
- SafeFileHandle.cs
- MediaScriptCommandRoutedEventArgs.cs
- XPathSelectionIterator.cs
- Compiler.cs
- DataServiceExpressionVisitor.cs
- NumericExpr.cs
- KeyedCollection.cs
- SafeNativeMethods.cs
- LicenseContext.cs
- InstanceDataCollectionCollection.cs
- QuotaThrottle.cs
- TextServicesHost.cs
- sitestring.cs
- SqlDataSource.cs
- SimpleType.cs
- TableHeaderCell.cs
- JoinQueryOperator.cs
- FileAuthorizationModule.cs
- ElapsedEventArgs.cs
- RowVisual.cs
- SafeEventLogWriteHandle.cs
- TiffBitmapDecoder.cs
- SmtpNetworkElement.cs
- ResXResourceReader.cs
- TaiwanCalendar.cs
- XmlSchemaSearchPattern.cs
- basevalidator.cs
- LongSumAggregationOperator.cs
- CompareValidator.cs
- ClientSideProviderDescription.cs
- SqlUdtInfo.cs
- VBIdentifierDesigner.xaml.cs
- Validator.cs
- SiteMap.cs
- CheckBoxRenderer.cs
- ModelItemExtensions.cs
- CombinedGeometry.cs
- PackageStore.cs
- ObjectTokenCategory.cs
- SqlInternalConnectionSmi.cs
- ExecutionContext.cs
- TokenBasedSetEnumerator.cs
- XmlSchemaAnnotation.cs
- XmlSchemaProviderAttribute.cs
- InputProcessorProfiles.cs
- WindowsAuthenticationEventArgs.cs
- JsonEnumDataContract.cs
- assertwrapper.cs
- PrintController.cs
- WindowsTab.cs
- SendingRequestEventArgs.cs
- DataServices.cs