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
- PropertyCondition.cs
- CreateUserWizardDesigner.cs
- InputLanguageSource.cs
- WsatConfiguration.cs
- OleDbReferenceCollection.cs
- PropertiesTab.cs
- CharAnimationBase.cs
- XamlReaderConstants.cs
- AnyReturnReader.cs
- FrameworkReadOnlyPropertyMetadata.cs
- CacheForPrimitiveTypes.cs
- _NestedMultipleAsyncResult.cs
- PageParserFilter.cs
- SectionRecord.cs
- Image.cs
- TreeViewTemplateSelector.cs
- TextServicesProperty.cs
- ProgressBar.cs
- DataServiceConfiguration.cs
- XPathParser.cs
- ExpressionBinding.cs
- LayoutEngine.cs
- PrimitiveCodeDomSerializer.cs
- ProfessionalColors.cs
- ResourcePermissionBaseEntry.cs
- TreeWalkHelper.cs
- ExpandCollapsePatternIdentifiers.cs
- MetadataArtifactLoaderComposite.cs
- TypeDependencyAttribute.cs
- CapiNative.cs
- PanningMessageFilter.cs
- CodeTypeDeclarationCollection.cs
- XmlSchemaObject.cs
- ExpandCollapsePattern.cs
- CollectionChangedEventManager.cs
- DispatcherHookEventArgs.cs
- Trace.cs
- Model3D.cs
- SecurityManager.cs
- XamlClipboardData.cs
- Geometry.cs
- SQLChars.cs
- CodeDefaultValueExpression.cs
- HtmlControlPersistable.cs
- PasswordBox.cs
- Form.cs
- WebPartMinimizeVerb.cs
- UrlMappingCollection.cs
- ApplicationDirectory.cs
- SafeArrayTypeMismatchException.cs
- HttpDebugHandler.cs
- SplayTreeNode.cs
- CellTreeNode.cs
- basenumberconverter.cs
- HtmlTernaryTree.cs
- FunctionNode.cs
- X509SubjectKeyIdentifierClause.cs
- XPathQilFactory.cs
- PointConverter.cs
- WebPartAuthorizationEventArgs.cs
- XamlStyleSerializer.cs
- DeclarationUpdate.cs
- KeyManager.cs
- AttachedPropertyInfo.cs
- SynchronousChannel.cs
- NativeMethodsCLR.cs
- TimeIntervalCollection.cs
- ColorTranslator.cs
- PenLineJoinValidation.cs
- OutputCacheSettingsSection.cs
- Token.cs
- CopyNodeSetAction.cs
- FlowDocumentReader.cs
- WindowsListViewScroll.cs
- RewritingValidator.cs
- DoubleCollection.cs
- ISFTagAndGuidCache.cs
- TextDocumentView.cs
- PolicyLevel.cs
- ResetableIterator.cs
- CheckBoxFlatAdapter.cs
- MetafileHeaderEmf.cs
- CodeTypeDelegate.cs
- DefaultBinder.cs
- KeyConstraint.cs
- TriggerCollection.cs
- PageContent.cs
- AnnotationHelper.cs
- SecureUICommand.cs
- UpDownBase.cs
- HeaderUtility.cs
- ContextStaticAttribute.cs
- ComPlusInstanceContextInitializer.cs
- TextUtf8RawTextWriter.cs
- SelectionItemProviderWrapper.cs
- ToolboxItemLoader.cs
- MenuItemStyle.cs
- SchemaCollectionCompiler.cs
- CompositeCollectionView.cs
- FormsAuthentication.cs