Code:
/ FXUpdate3074 / FXUpdate3074 / 1.1 / DEVDIV / depot / DevDiv / releases / whidbey / QFE / ndp / fx / src / xsp / System / Web / UI / WebControls / ValidatorCompatibilityHelper.cs / 2 / 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. //------------------------------------------------------------------------------ //// 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.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- FileDialogCustomPlace.cs
- NextPreviousPagerField.cs
- DataAdapter.cs
- SortableBindingList.cs
- Imaging.cs
- PreviewPageInfo.cs
- BitmapSizeOptions.cs
- TableLayoutPanelBehavior.cs
- MergeFailedEvent.cs
- ListViewDeletedEventArgs.cs
- ToolboxItemFilterAttribute.cs
- WsdlBuildProvider.cs
- GeometryHitTestResult.cs
- TransformerInfoCollection.cs
- ReadOnlyCollectionBase.cs
- FieldBuilder.cs
- DirectoryInfo.cs
- CodeDomLocalizationProvider.cs
- DiagnosticStrings.cs
- DesignOnlyAttribute.cs
- InputMethodStateChangeEventArgs.cs
- NullableBoolConverter.cs
- ActivationServices.cs
- FontSource.cs
- TextControl.cs
- DBSqlParser.cs
- Part.cs
- PageVisual.cs
- SHA384Cng.cs
- DataSourceSelectArguments.cs
- PeerContact.cs
- CodeMethodInvokeExpression.cs
- ListMarkerSourceInfo.cs
- Lease.cs
- ObjectDataSourceDisposingEventArgs.cs
- PerspectiveCamera.cs
- JpegBitmapEncoder.cs
- WebColorConverter.cs
- Attributes.cs
- RelationalExpressions.cs
- IndentedWriter.cs
- HealthMonitoringSection.cs
- ColumnWidthChangedEvent.cs
- RuntimeHelpers.cs
- SafeEventLogWriteHandle.cs
- Transform3DCollection.cs
- DesignTimeResourceProviderFactoryAttribute.cs
- HttpPostProtocolImporter.cs
- SafeRightsManagementHandle.cs
- StylusPointProperties.cs
- ParameterToken.cs
- ScriptingProfileServiceSection.cs
- WhiteSpaceTrimStringConverter.cs
- __FastResourceComparer.cs
- PeerNameRecord.cs
- TreeWalkHelper.cs
- SmiMetaDataProperty.cs
- TextAdaptor.cs
- SqlConnectionString.cs
- PropertyIDSet.cs
- TreeSet.cs
- PointAnimationUsingPath.cs
- MSG.cs
- DefaultPropertiesToSend.cs
- HtmlTable.cs
- WebPartPersonalization.cs
- Image.cs
- AddDataControlFieldDialog.cs
- NonVisualControlAttribute.cs
- WebBrowserEvent.cs
- QueryResponse.cs
- CommandSet.cs
- PrintPreviewControl.cs
- MouseEventArgs.cs
- XmlCollation.cs
- HostedElements.cs
- IncrementalReadDecoders.cs
- BaseDataBoundControl.cs
- DiagnosticsConfigurationHandler.cs
- VisualStateChangedEventArgs.cs
- FileResponseElement.cs
- SafeThreadHandle.cs
- AuthenticationModuleElementCollection.cs
- _ListenerAsyncResult.cs
- ExtentKey.cs
- SrgsSubset.cs
- MenuItemBindingCollection.cs
- SessionParameter.cs
- UrlParameterReader.cs
- DayRenderEvent.cs
- HuffCodec.cs
- WebControlsSection.cs
- AssertFilter.cs
- AttachedPropertyMethodSelector.cs
- RemoteDebugger.cs
- OdbcConnectionOpen.cs
- KeyConverter.cs
- SpecularMaterial.cs
- DrawingContext.cs
- ServiceDiscoveryBehavior.cs