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
- AndMessageFilter.cs
- ScaleTransform3D.cs
- KeyFrames.cs
- MediaScriptCommandRoutedEventArgs.cs
- TemplateKey.cs
- SafeFreeMibTable.cs
- TraceUtils.cs
- PrePrepareMethodAttribute.cs
- SchemaMapping.cs
- WindowsUpDown.cs
- ProcessProtocolHandler.cs
- oledbconnectionstring.cs
- SiteMapPathDesigner.cs
- SafePointer.cs
- WindowsRegion.cs
- CssTextWriter.cs
- FatalException.cs
- SimplePropertyEntry.cs
- CodeTypeParameter.cs
- PathNode.cs
- TemplateControlCodeDomTreeGenerator.cs
- NumericUpDownAccelerationCollection.cs
- SimpleBitVector32.cs
- NaturalLanguageHyphenator.cs
- BaseParser.cs
- Int64.cs
- OdbcInfoMessageEvent.cs
- SecurityVersion.cs
- ColorMap.cs
- MachineKey.cs
- uribuilder.cs
- PackageFilter.cs
- ImageDrawing.cs
- InlineCollection.cs
- ReaderWriterLockWrapper.cs
- SmtpSpecifiedPickupDirectoryElement.cs
- SelectionEditingBehavior.cs
- CompatibleIComparer.cs
- HMACRIPEMD160.cs
- followingsibling.cs
- ClientRolePrincipal.cs
- OleDbCommandBuilder.cs
- DependencyProperty.cs
- WrappedIUnknown.cs
- SchemaImporterExtension.cs
- EditingMode.cs
- DemultiplexingDispatchMessageFormatter.cs
- SelectionItemPattern.cs
- ThreadBehavior.cs
- IdentityNotMappedException.cs
- Pair.cs
- Regex.cs
- ZipFileInfo.cs
- Page.cs
- DockProviderWrapper.cs
- HttpVersion.cs
- ToolStripSplitStackLayout.cs
- Rule.cs
- FixedDSBuilder.cs
- CodeExporter.cs
- OleDbReferenceCollection.cs
- Table.cs
- SystemGatewayIPAddressInformation.cs
- KeyValuePairs.cs
- XmlElementCollection.cs
- XmlIgnoreAttribute.cs
- TypedDataSetSchemaImporterExtensionFx35.cs
- XamlDesignerSerializationManager.cs
- HMACRIPEMD160.cs
- WindowsFormsHostAutomationPeer.cs
- ItemPager.cs
- DataGridViewAutoSizeColumnModeEventArgs.cs
- WorkflowTransactionOptions.cs
- SerialStream.cs
- InfoCardRSAPKCS1SignatureFormatter.cs
- XPathEmptyIterator.cs
- ScriptingProfileServiceSection.cs
- ScaleTransform3D.cs
- RuleRef.cs
- CompilationUnit.cs
- DllNotFoundException.cs
- peersecuritysettings.cs
- SecurityToken.cs
- SafeRightsManagementHandle.cs
- LiteralDesigner.cs
- PenLineCapValidation.cs
- SiteOfOriginPart.cs
- ScaleTransform.cs
- AmbientProperties.cs
- TransformerConfigurationWizardBase.cs
- PublisherMembershipCondition.cs
- CngProvider.cs
- BoundColumn.cs
- HistoryEventArgs.cs
- EnumerableValidator.cs
- ModifierKeysValueSerializer.cs
- DataListGeneralPage.cs
- UserControl.cs
- ShortcutKeysEditor.cs
- PageStatePersister.cs