Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / xsp / System / Web / UI / WebControls / ValidatorCompatibilityHelper.cs / 1305376 / 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}); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //// 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}); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- SinglePageViewer.cs
- HiddenFieldDesigner.cs
- DynamicRenderer.cs
- XmlSerializerVersionAttribute.cs
- SqlRowUpdatedEvent.cs
- SqlProvider.cs
- ConstNode.cs
- SqlSupersetValidator.cs
- AnimationException.cs
- SiteMapDataSource.cs
- FileDialog_Vista_Interop.cs
- IntranetCredentialPolicy.cs
- Utilities.cs
- FilterElement.cs
- AttributeCollection.cs
- StatusBarAutomationPeer.cs
- SortDescriptionCollection.cs
- PolyLineSegmentFigureLogic.cs
- CompModSwitches.cs
- MergablePropertyAttribute.cs
- ExpressionBinding.cs
- EventSourceCreationData.cs
- StrongNameKeyPair.cs
- DrawingContextWalker.cs
- TagPrefixCollection.cs
- UserThread.cs
- ObjectAssociationEndMapping.cs
- Zone.cs
- Matrix3DValueSerializer.cs
- DataRowComparer.cs
- BaseCollection.cs
- ServiceModelStringsVersion1.cs
- SystemFonts.cs
- Publisher.cs
- PnrpPeerResolver.cs
- sqlmetadatafactory.cs
- SuppressIldasmAttribute.cs
- SoapConverter.cs
- JsonReaderDelegator.cs
- DataGridCheckBoxColumn.cs
- ConfigurationValidatorAttribute.cs
- TimeoutValidationAttribute.cs
- ModelItemExtensions.cs
- SecurityElement.cs
- RangeContentEnumerator.cs
- UnsafeNativeMethods.cs
- PrintDocument.cs
- HttpModuleAction.cs
- messageonlyhwndwrapper.cs
- QueryValue.cs
- SafeRsaProviderHandle.cs
- WorkflowMarkupSerializationProvider.cs
- HttpCacheVaryByContentEncodings.cs
- DbProviderFactories.cs
- StateRuntime.cs
- ReadOnlyAttribute.cs
- TypeForwardedToAttribute.cs
- Command.cs
- ComponentChangingEvent.cs
- PackWebRequest.cs
- BinaryEditor.cs
- FontCollection.cs
- StrokeCollection2.cs
- TextServicesHost.cs
- DataGridItem.cs
- Component.cs
- StylusLogic.cs
- DesignerSerializationOptionsAttribute.cs
- MethodBuilder.cs
- _AutoWebProxyScriptWrapper.cs
- EventLogPermissionEntry.cs
- AppLevelCompilationSectionCache.cs
- LinearGradientBrush.cs
- TypeLoadException.cs
- CreateUserWizard.cs
- SequenceFullException.cs
- GroupJoinQueryOperator.cs
- TimeStampChecker.cs
- DoubleLinkList.cs
- Nullable.cs
- WaitForChangedResult.cs
- DependencyPropertyKey.cs
- JsonServiceDocumentSerializer.cs
- FormViewRow.cs
- FunctionMappingTranslator.cs
- CurrencyManager.cs
- SequentialUshortCollection.cs
- PagesSection.cs
- Wildcard.cs
- RandomNumberGenerator.cs
- MessageBodyDescription.cs
- DataGridViewRowPrePaintEventArgs.cs
- GridViewEditEventArgs.cs
- DashStyle.cs
- SqlDataSourceEnumerator.cs
- MemberRelationshipService.cs
- SelectManyQueryOperator.cs
- RenderDataDrawingContext.cs
- ComplexPropertyEntry.cs
- LinkLabelLinkClickedEvent.cs