Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / ndp / fx / src / xsp / System / Web / UI / WebControls / ValidatorCompatibilityHelper.cs / 1 / 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
- XmlSchemaType.cs
- formatter.cs
- PropertyValueUIItem.cs
- Type.cs
- PathSegmentCollection.cs
- ListMarkerLine.cs
- WhereaboutsReader.cs
- WizardForm.cs
- HttpRequestMessageProperty.cs
- TextInfo.cs
- RelatedCurrencyManager.cs
- FrameSecurityDescriptor.cs
- CodePropertyReferenceExpression.cs
- WizardStepBase.cs
- DbConnectionOptions.cs
- EmptyReadOnlyDictionaryInternal.cs
- SQLByteStorage.cs
- HelpEvent.cs
- KeyProperty.cs
- HtmlTableRowCollection.cs
- UnmanagedMemoryStream.cs
- FlowLayoutPanel.cs
- Base64Stream.cs
- DirectoryNotFoundException.cs
- DynamicValueConverter.cs
- EnumValidator.cs
- BindableTemplateBuilder.cs
- CssTextWriter.cs
- PixelFormat.cs
- DesignerCapabilities.cs
- ModelItemDictionaryImpl.cs
- Utility.cs
- Debug.cs
- XmlSchemaRedefine.cs
- JpegBitmapEncoder.cs
- D3DImage.cs
- MetaChildrenColumn.cs
- TableStyle.cs
- PackagePart.cs
- ListControlBoundActionList.cs
- CompilerErrorCollection.cs
- PageWrapper.cs
- DesignBindingConverter.cs
- MethodBuilderInstantiation.cs
- DataServiceKeyAttribute.cs
- StrokeCollectionDefaultValueFactory.cs
- Color.cs
- ObjectSerializerFactory.cs
- DSACryptoServiceProvider.cs
- ParseHttpDate.cs
- Range.cs
- RuntimeHelpers.cs
- EnumMemberAttribute.cs
- Domain.cs
- SpellerStatusTable.cs
- ExpressionLexer.cs
- ConfigXmlComment.cs
- RecordManager.cs
- NavigationPropertyAccessor.cs
- ExternalException.cs
- CircleEase.cs
- DiscoveryClientDuplexChannel.cs
- SchemaImporterExtensionElement.cs
- ColorTransform.cs
- Bidi.cs
- ActivitiesCollection.cs
- StrokeCollectionConverter.cs
- Operator.cs
- ObjectDataSourceEventArgs.cs
- StoragePropertyMapping.cs
- ToolStripContextMenu.cs
- CallbackValidator.cs
- MailAddress.cs
- WebPartTransformerAttribute.cs
- Crc32.cs
- _SSPIWrapper.cs
- FaultConverter.cs
- ToggleButtonAutomationPeer.cs
- UInt32Storage.cs
- WebPartMovingEventArgs.cs
- ProcessHostMapPath.cs
- RangeValidator.cs
- DataGridViewRowErrorTextNeededEventArgs.cs
- CharacterBufferReference.cs
- UrlRoutingHandler.cs
- AssociationType.cs
- DbParameterHelper.cs
- DecoderFallbackWithFailureFlag.cs
- PeerPresenceInfo.cs
- ElementProxy.cs
- Panel.cs
- AmbientProperties.cs
- TextEndOfParagraph.cs
- Point3DAnimationBase.cs
- Metadata.cs
- DataGridLength.cs
- SQLResource.cs
- ProviderCommandInfoUtils.cs
- EntityDataSourceContextCreatingEventArgs.cs
- LocalTransaction.cs