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
- RelationshipEntry.cs
- SslStream.cs
- LinkedResource.cs
- latinshape.cs
- GridEntry.cs
- Hyperlink.cs
- TimeSpan.cs
- UriTemplateMatchException.cs
- DefaultValueAttribute.cs
- XmlEncodedRawTextWriter.cs
- UntypedNullExpression.cs
- DataPointer.cs
- securestring.cs
- ContextMenuAutomationPeer.cs
- DesignerAttribute.cs
- SslStreamSecurityUpgradeProvider.cs
- XmlDocumentFragment.cs
- BindingContext.cs
- Composition.cs
- StringToken.cs
- AppSettingsExpressionBuilder.cs
- XmlILModule.cs
- HostingEnvironment.cs
- ScriptResourceAttribute.cs
- SqlNodeAnnotations.cs
- PermissionRequestEvidence.cs
- MailWriter.cs
- DbMetaDataFactory.cs
- ContextMarshalException.cs
- QuaternionIndependentAnimationStorage.cs
- DataPointer.cs
- Stackframe.cs
- BasePattern.cs
- PageHandlerFactory.cs
- ThreadLocal.cs
- Size.cs
- CursorInteropHelper.cs
- FilterableAttribute.cs
- ToolboxComponentsCreatedEventArgs.cs
- CompilerErrorCollection.cs
- DoubleAnimation.cs
- ChannelManagerService.cs
- ProbeDuplexCD1AsyncResult.cs
- QilInvokeLateBound.cs
- TreeNodeEventArgs.cs
- ProviderCommandInfoUtils.cs
- BulletDecorator.cs
- MessageCredentialType.cs
- ConditionedDesigner.cs
- RecordManager.cs
- RequiredFieldValidator.cs
- WinEventWrap.cs
- AttachInfo.cs
- GradientStopCollection.cs
- HelpFileFileNameEditor.cs
- BlockCollection.cs
- UnsupportedPolicyOptionsException.cs
- SafeNativeMethods.cs
- ProtocolsConfiguration.cs
- TextDecorationCollectionConverter.cs
- KeyBinding.cs
- Stacktrace.cs
- ProcessProtocolHandler.cs
- InertiaRotationBehavior.cs
- OleDbConnectionFactory.cs
- oledbmetadatacolumnnames.cs
- TypeReference.cs
- WebPartConnectionsConfigureVerb.cs
- Rect3D.cs
- ShaderRenderModeValidation.cs
- Typeface.cs
- SpotLight.cs
- TdsParameterSetter.cs
- MediaCommands.cs
- DebugHandleTracker.cs
- RemotingAttributes.cs
- BinaryMethodMessage.cs
- PolicyFactory.cs
- CorrelationTokenInvalidatedHandler.cs
- AlternationConverter.cs
- SaveWorkflowCommand.cs
- RequiredAttributeAttribute.cs
- Point3DConverter.cs
- TextRangeEditTables.cs
- AsyncCallback.cs
- PrintController.cs
- ZipPackage.cs
- ProgressPage.cs
- HttpApplicationStateWrapper.cs
- AsyncOperationManager.cs
- BitmapMetadataEnumerator.cs
- Pens.cs
- IOThreadTimer.cs
- CatalogZoneAutoFormat.cs
- TimelineCollection.cs
- RowParagraph.cs
- _AuthenticationState.cs
- ConsoleEntryPoint.cs
- Roles.cs
- CodeRemoveEventStatement.cs