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
- VisualBasicSettingsHandler.cs
- EntityModelBuildProvider.cs
- _BufferOffsetSize.cs
- Int32RectValueSerializer.cs
- ScrollChangedEventArgs.cs
- ObjectFullSpanRewriter.cs
- VirtualPath.cs
- PasswordTextNavigator.cs
- AuthenticationModuleElementCollection.cs
- wmiprovider.cs
- AsymmetricKeyExchangeFormatter.cs
- BamlLocalizabilityResolver.cs
- ImageCodecInfoPrivate.cs
- StringUtil.cs
- ConstraintStruct.cs
- TypeContext.cs
- SqlDependencyListener.cs
- UserControlCodeDomTreeGenerator.cs
- OutputCacheProfileCollection.cs
- NamespaceEmitter.cs
- ZipIOLocalFileDataDescriptor.cs
- SplitterDesigner.cs
- SmiEventStream.cs
- RegistrySecurity.cs
- AssemblyResolver.cs
- coordinatorfactory.cs
- DataControlField.cs
- ExpandCollapsePattern.cs
- Compiler.cs
- InvalidPropValue.cs
- SrgsItemList.cs
- SettingsSection.cs
- ComboBoxItem.cs
- OdbcInfoMessageEvent.cs
- safex509handles.cs
- Cursor.cs
- NTAccount.cs
- LineUtil.cs
- FixedSOMImage.cs
- DataGridClipboardCellContent.cs
- DirectoryNotFoundException.cs
- OracleConnectionFactory.cs
- Monitor.cs
- ImportCatalogPart.cs
- DbMetaDataCollectionNames.cs
- DynamicEndpointElement.cs
- X509Utils.cs
- ChannelServices.cs
- PermissionSet.cs
- TreeView.cs
- SemanticValue.cs
- SqlDeflator.cs
- ControlValuePropertyAttribute.cs
- CapabilitiesUse.cs
- TextRunTypographyProperties.cs
- COM2TypeInfoProcessor.cs
- RectangleConverter.cs
- RoutingTable.cs
- PeerTransportListenAddressConverter.cs
- ModelItemExtensions.cs
- SqlOuterApplyReducer.cs
- ListViewCancelEventArgs.cs
- RepeatInfo.cs
- TemplateColumn.cs
- WebHttpBinding.cs
- ExtendedPropertyCollection.cs
- FileClassifier.cs
- Link.cs
- SoundPlayerAction.cs
- PolyQuadraticBezierSegment.cs
- SystemDropShadowChrome.cs
- LayoutSettings.cs
- Label.cs
- TextRangeEditLists.cs
- Dictionary.cs
- SymLanguageType.cs
- FileDialogPermission.cs
- RemotingConfigParser.cs
- TableLayout.cs
- UnicastIPAddressInformationCollection.cs
- ImagingCache.cs
- GifBitmapEncoder.cs
- Attributes.cs
- AbsoluteQuery.cs
- AlignmentYValidation.cs
- HealthMonitoringSectionHelper.cs
- Span.cs
- tibetanshape.cs
- AutomationAttributeInfo.cs
- RegexNode.cs
- UpdateManifestForBrowserApplication.cs
- Matrix3DValueSerializer.cs
- OpCellTreeNode.cs
- TypeUsageBuilder.cs
- HeaderedItemsControl.cs
- HttpDictionary.cs
- XmlSchemaIdentityConstraint.cs
- CompensationHandlingFilter.cs
- XsltContext.cs
- RuleSettings.cs