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
- ConsoleEntryPoint.cs
- ServiceInfo.cs
- SmiMetaDataProperty.cs
- MeshGeometry3D.cs
- CatalogZoneBase.cs
- QilTernary.cs
- ControlValuePropertyAttribute.cs
- isolationinterop.cs
- IsolatedStoragePermission.cs
- DocumentNUp.cs
- PermissionListSet.cs
- Formatter.cs
- InstanceDescriptor.cs
- XsltCompileContext.cs
- AttributeConverter.cs
- PathTooLongException.cs
- ProvideValueServiceProvider.cs
- PocoPropertyAccessorStrategy.cs
- SQlBooleanStorage.cs
- TemplateBindingExpression.cs
- InputLanguageCollection.cs
- XmlException.cs
- ValueExpressions.cs
- MILUtilities.cs
- Attachment.cs
- ListCollectionView.cs
- ToolBarButtonDesigner.cs
- DbTransaction.cs
- UnwrappedTypesXmlSerializerManager.cs
- DataSourceListEditor.cs
- GorillaCodec.cs
- InfoCardRSAPKCS1KeyExchangeDeformatter.cs
- DelegateHelpers.Generated.cs
- DocumentPage.cs
- TreeView.cs
- DataColumnCollection.cs
- CdpEqualityComparer.cs
- DesignTimeValidationFeature.cs
- PrintPageEvent.cs
- WizardForm.cs
- IListConverters.cs
- Main.cs
- DataGridClipboardCellContent.cs
- SearchExpression.cs
- LayoutUtils.cs
- Pts.cs
- ErrorHandlerFaultInfo.cs
- UnsafeNativeMethods.cs
- OdbcUtils.cs
- ModulesEntry.cs
- AppDomainCompilerProxy.cs
- UnsafeNetInfoNativeMethods.cs
- UserPreferenceChangingEventArgs.cs
- BidOverLoads.cs
- SiteMapDataSource.cs
- AmbientEnvironment.cs
- DocumentReference.cs
- DetailsViewModeEventArgs.cs
- Token.cs
- PrinterResolution.cs
- SchemaAttDef.cs
- HttpCookieCollection.cs
- TokenBasedSet.cs
- IHttpResponseInternal.cs
- ProfileEventArgs.cs
- DecimalAnimation.cs
- FlowLayoutPanel.cs
- KoreanLunisolarCalendar.cs
- QueryCacheEntry.cs
- NullableDoubleAverageAggregationOperator.cs
- StatusBarPanel.cs
- ObjectItemConventionAssemblyLoader.cs
- MethodRental.cs
- SecurityResources.cs
- HttpCookieCollection.cs
- LogicalExpr.cs
- SmtpFailedRecipientsException.cs
- Mutex.cs
- XMLSchema.cs
- StorageMappingItemCollection.cs
- StrokeCollectionConverter.cs
- DataFormats.cs
- SoapException.cs
- SparseMemoryStream.cs
- GridViewHeaderRowPresenter.cs
- HtmlTitle.cs
- EdmMember.cs
- RegionInfo.cs
- FieldBuilder.cs
- ErrorHandlerModule.cs
- Version.cs
- SynchronizedDispatch.cs
- WindowsToolbar.cs
- JsonByteArrayDataContract.cs
- ProxySimple.cs
- XmlSerializerVersionAttribute.cs
- ChtmlTextWriter.cs
- DocumentViewerAutomationPeer.cs
- AdCreatedEventArgs.cs
- InputProcessorProfiles.cs