Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / ndp / fx / src / xsp / System / Web / UI / WebControls / ValidatorCompatibilityHelper.cs / 3 / 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}); } } }
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- MessageHeaderAttribute.cs
- PageRanges.cs
- IERequestCache.cs
- Guid.cs
- Calendar.cs
- QueryOperatorEnumerator.cs
- ReferenceList.cs
- Matrix.cs
- ToolStripItemTextRenderEventArgs.cs
- HttpCapabilitiesSectionHandler.cs
- EventLogInformation.cs
- listitem.cs
- ObjectDataSourceMethodEventArgs.cs
- EventSetter.cs
- IISUnsafeMethods.cs
- MediaScriptCommandRoutedEventArgs.cs
- MSAANativeProvider.cs
- CompressStream.cs
- DataControlReference.cs
- SapiGrammar.cs
- FactoryGenerator.cs
- FixedTextPointer.cs
- Hyperlink.cs
- ZipIOCentralDirectoryFileHeader.cs
- Native.cs
- PathFigureCollectionConverter.cs
- UserControlBuildProvider.cs
- DataServiceResponse.cs
- Storyboard.cs
- AppDomain.cs
- BuildProvidersCompiler.cs
- NestedContainer.cs
- WebBrowserEvent.cs
- DataGridViewCellStyleChangedEventArgs.cs
- SqlVersion.cs
- ModifierKeysConverter.cs
- ClientConfigurationSystem.cs
- XmlSchemaGroupRef.cs
- QuaternionAnimationBase.cs
- Span.cs
- XPathArrayIterator.cs
- MaterialGroup.cs
- recordstatescratchpad.cs
- BitmapEffectGroup.cs
- TypefaceMetricsCache.cs
- DataGridColumn.cs
- TextEffect.cs
- oledbmetadatacollectionnames.cs
- DataServiceEntityAttribute.cs
- InternalCache.cs
- TableItemPattern.cs
- BaseTemplateBuildProvider.cs
- DetailsViewInsertedEventArgs.cs
- TypeValidationEventArgs.cs
- wgx_exports.cs
- PathSegment.cs
- QuarticEase.cs
- TrueReadOnlyCollection.cs
- WindowsListViewGroupHelper.cs
- EntitySet.cs
- Verify.cs
- AdPostCacheSubstitution.cs
- EdmValidator.cs
- VirtualizedItemPattern.cs
- DataGridViewAutoSizeModeEventArgs.cs
- TrackBar.cs
- InlinedAggregationOperator.cs
- Configuration.cs
- RowCache.cs
- Renderer.cs
- CheckBoxRenderer.cs
- COSERVERINFO.cs
- EventlogProvider.cs
- SecurityException.cs
- HtmlGenericControl.cs
- BigIntegerStorage.cs
- BindingExpressionBase.cs
- X509ChainElement.cs
- UrlMappingCollection.cs
- LabelEditEvent.cs
- RoutedEventArgs.cs
- StylusCollection.cs
- JsonUriDataContract.cs
- BuilderPropertyEntry.cs
- UnicodeEncoding.cs
- ArcSegment.cs
- BrushMappingModeValidation.cs
- ThrowHelper.cs
- CatalogPart.cs
- UnsafeNativeMethods.cs
- LingerOption.cs
- SecUtil.cs
- DocumentCollection.cs
- DbReferenceCollection.cs
- StringTraceRecord.cs
- OutOfMemoryException.cs
- SByteStorage.cs
- BamlReader.cs
- EntityKey.cs
- SafeNativeMethods.cs