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
- WindowsHyperlink.cs
- SemaphoreFullException.cs
- NameHandler.cs
- IOException.cs
- SizeFConverter.cs
- WebPart.cs
- RemoteWebConfigurationHostStream.cs
- PrintPreviewDialog.cs
- CodeValidator.cs
- ArgumentException.cs
- GeometryDrawing.cs
- AssociationSet.cs
- ParseElement.cs
- SemanticTag.cs
- ProcessHostMapPath.cs
- ConnectorDragDropGlyph.cs
- IMembershipProvider.cs
- IPEndPointCollection.cs
- ScriptingRoleServiceSection.cs
- ButtonColumn.cs
- GradientSpreadMethodValidation.cs
- WebPartTransformer.cs
- DatagridviewDisplayedBandsData.cs
- HtmlInputPassword.cs
- BitmapDecoder.cs
- PolyLineSegmentFigureLogic.cs
- SingleTagSectionHandler.cs
- CodeArrayCreateExpression.cs
- CalendarDesigner.cs
- ServiceHttpHandlerFactory.cs
- TypefaceMetricsCache.cs
- ColorAnimation.cs
- AuthorizationRule.cs
- HierarchicalDataBoundControlAdapter.cs
- ISAPIRuntime.cs
- TopClause.cs
- HttpFileCollection.cs
- File.cs
- EntityDataSource.cs
- _StreamFramer.cs
- FormViewInsertedEventArgs.cs
- TypeBrowserDialog.cs
- BoundField.cs
- DashStyle.cs
- Fonts.cs
- RadioButtonAutomationPeer.cs
- TraceContext.cs
- ObjectAnimationBase.cs
- EventRoute.cs
- AdapterUtil.cs
- ObjectTokenCategory.cs
- HebrewNumber.cs
- LinqDataSourceHelper.cs
- FixedSOMTable.cs
- DataTableMappingCollection.cs
- Geometry.cs
- ModulesEntry.cs
- ProcessModuleCollection.cs
- ExceptionCollection.cs
- ZipIOCentralDirectoryFileHeader.cs
- StyleXamlParser.cs
- KernelTypeValidation.cs
- TextProviderWrapper.cs
- DataProtectionSecurityStateEncoder.cs
- AssociationTypeEmitter.cs
- DataGridTablesFactory.cs
- PowerModeChangedEventArgs.cs
- ReflectionServiceProvider.cs
- DecoderReplacementFallback.cs
- XmlObjectSerializerWriteContextComplexJson.cs
- CodeFieldReferenceExpression.cs
- GenericQueueSurrogate.cs
- Transform.cs
- OptimizedTemplateContentHelper.cs
- Size3DConverter.cs
- PersistenceTypeAttribute.cs
- SqlClientPermission.cs
- CollectionChangedEventManager.cs
- EnumerableWrapperWeakToStrong.cs
- SubtreeProcessor.cs
- FontFamilyValueSerializer.cs
- LookupNode.cs
- HtmlShimManager.cs
- CodePrimitiveExpression.cs
- TableLayoutRowStyleCollection.cs
- BaseTypeViewSchema.cs
- IgnoreFlushAndCloseStream.cs
- XmlMapping.cs
- ViewGenResults.cs
- IgnorePropertiesAttribute.cs
- DataGridRowHeader.cs
- VBIdentifierTrimConverter.cs
- XmlSignificantWhitespace.cs
- ErrorStyle.cs
- GroupDescription.cs
- Int32AnimationUsingKeyFrames.cs
- SmiSettersStream.cs
- Process.cs
- VerticalAlignConverter.cs
- WorkflowRuntimeServiceElementCollection.cs