Code:
/ DotNET / DotNET / 8.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
- DigitalSignatureProvider.cs
- ReadOnlyHierarchicalDataSourceView.cs
- DataRecordInternal.cs
- InputLanguageSource.cs
- ClientCultureInfo.cs
- SurrogateDataContract.cs
- IisTraceWebEventProvider.cs
- DesignTimeTemplateParser.cs
- AspNetHostingPermission.cs
- SerializationStore.cs
- TaskFileService.cs
- DataGridViewComboBoxEditingControl.cs
- Misc.cs
- SectionRecord.cs
- HelpProvider.cs
- LabelTarget.cs
- JsonQNameDataContract.cs
- WeakHashtable.cs
- ComponentDispatcher.cs
- ParameterCollection.cs
- ObjectConverter.cs
- DocumentOrderQuery.cs
- PackageProperties.cs
- XhtmlBasicLiteralTextAdapter.cs
- WebServiceEnumData.cs
- ScrollProperties.cs
- TextTreeDeleteContentUndoUnit.cs
- Int32CollectionConverter.cs
- RowVisual.cs
- ExceptionDetail.cs
- CorrelationManager.cs
- ToolStripPanel.cs
- DrawingContextFlattener.cs
- HandlerMappingMemo.cs
- BufferModeSettings.cs
- PartialCachingAttribute.cs
- ColumnReorderedEventArgs.cs
- BitmapDecoder.cs
- WebConfigurationHostFileChange.cs
- CursorInteropHelper.cs
- SafeEventHandle.cs
- FlowLayoutPanel.cs
- RepeatBehaviorConverter.cs
- ProcessModelSection.cs
- ProxyWebPartManager.cs
- HelpKeywordAttribute.cs
- ObjectFactoryCodeDomTreeGenerator.cs
- PerformanceCounterPermissionEntry.cs
- SecurityPermission.cs
- Hyperlink.cs
- __ComObject.cs
- DefaultTypeArgumentAttribute.cs
- XamlGridLengthSerializer.cs
- ChainOfResponsibility.cs
- SqlClientMetaDataCollectionNames.cs
- cryptoapiTransform.cs
- FontFamily.cs
- DataGridViewColumnCollectionDialog.cs
- ConfigXmlWhitespace.cs
- SqlServer2KCompatibilityAnnotation.cs
- ProxyGenerationError.cs
- AttachedAnnotation.cs
- TextFormatterImp.cs
- Helpers.cs
- HttpGetProtocolImporter.cs
- ZipIOModeEnforcingStream.cs
- TableDetailsCollection.cs
- IdnMapping.cs
- UDPClient.cs
- Signature.cs
- HostingEnvironmentException.cs
- AssociationSet.cs
- MethodAccessException.cs
- RenderContext.cs
- TiffBitmapDecoder.cs
- Stylus.cs
- PropertyPushdownHelper.cs
- VectorCollection.cs
- ServiceProviders.cs
- RulePatternOps.cs
- Signature.cs
- EventSetterHandlerConverter.cs
- ComponentChangingEvent.cs
- DataGridCommandEventArgs.cs
- Parameter.cs
- ComboBox.cs
- SafeWaitHandle.cs
- loginstatus.cs
- QuadraticBezierSegment.cs
- FilteredDataSetHelper.cs
- XdrBuilder.cs
- XmlMtomReader.cs
- ExpressionParser.cs
- Parser.cs
- StreamInfo.cs
- DebugTracing.cs
- TreeNodeBindingCollection.cs
- StrongNamePublicKeyBlob.cs
- Number.cs
- CacheVirtualItemsEvent.cs