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
- PropertyRef.cs
- BamlBinaryWriter.cs
- ConditionValidator.cs
- VSWCFServiceContractGenerator.cs
- ContentType.cs
- BitmapImage.cs
- PrimitiveSchema.cs
- ImageSource.cs
- ArrayConverter.cs
- XmlSchemaImport.cs
- SiteMapDataSource.cs
- MessageSmuggler.cs
- WorkflowOwnerAsyncResult.cs
- WebSysDescriptionAttribute.cs
- ClientFormsAuthenticationCredentials.cs
- DependencyProperty.cs
- SmiMetaDataProperty.cs
- counter.cs
- AuthenticationException.cs
- Compilation.cs
- RequestQueryParser.cs
- MLangCodePageEncoding.cs
- DataReaderContainer.cs
- TextTabProperties.cs
- LicenseContext.cs
- UserMapPath.cs
- InternalBufferManager.cs
- ToolTipAutomationPeer.cs
- BuildProviderCollection.cs
- SignedXml.cs
- ErrorTableItemStyle.cs
- ValidatingReaderNodeData.cs
- RootBrowserWindowProxy.cs
- TextDecorationCollectionConverter.cs
- CodeDirectiveCollection.cs
- Variant.cs
- KerberosReceiverSecurityToken.cs
- TimeoutException.cs
- BindingUtils.cs
- NameScopePropertyAttribute.cs
- NameObjectCollectionBase.cs
- CriticalFinalizerObject.cs
- CfgRule.cs
- ControlPager.cs
- LinkDescriptor.cs
- BitmapImage.cs
- DictionaryTraceRecord.cs
- ItemsControlAutomationPeer.cs
- Vector3DAnimationBase.cs
- OutputCacheProfileCollection.cs
- Decorator.cs
- SettingsPropertyValue.cs
- SchemaNamespaceManager.cs
- ParserStreamGeometryContext.cs
- DiscoveryDocumentReference.cs
- FlowDocumentScrollViewerAutomationPeer.cs
- ExpressionParser.cs
- DynamicEntity.cs
- PasswordDeriveBytes.cs
- SourceFileInfo.cs
- ForEachAction.cs
- MetadataPropertyAttribute.cs
- UrlPropertyAttribute.cs
- StatusBarDrawItemEvent.cs
- HtmlTable.cs
- AttributeSetAction.cs
- TextParaClient.cs
- WebServicesSection.cs
- WinEventTracker.cs
- LinqDataSourceValidationException.cs
- Formatter.cs
- HelpHtmlBuilder.cs
- GeneralTransform2DTo3DTo2D.cs
- ModelService.cs
- HotSpotCollectionEditor.cs
- InternalConfigHost.cs
- BrowsableAttribute.cs
- UniformGrid.cs
- Literal.cs
- WebUtil.cs
- ServiceMemoryGates.cs
- DecoderNLS.cs
- SqlClientMetaDataCollectionNames.cs
- HttpContextServiceHost.cs
- Collection.cs
- Double.cs
- PersonalizablePropertyEntry.cs
- MultipleViewProviderWrapper.cs
- UrlMappingsSection.cs
- DiscoveryMessageSequenceCD1.cs
- CanonicalFontFamilyReference.cs
- InputReport.cs
- TreePrinter.cs
- SrgsRuleRef.cs
- Int32.cs
- MethodBuilderInstantiation.cs
- PaintEvent.cs
- QilLiteral.cs
- unitconverter.cs
- AnimationException.cs