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
- Link.cs
- AlternateViewCollection.cs
- ReferencedAssembly.cs
- DataGridViewRowsRemovedEventArgs.cs
- RSAOAEPKeyExchangeDeformatter.cs
- XmlSchemaSimpleType.cs
- RegexStringValidatorAttribute.cs
- IndexingContentUnit.cs
- ScalarType.cs
- UnsafeNativeMethods.cs
- LocalFileSettingsProvider.cs
- SQLMembershipProvider.cs
- RelatedView.cs
- GeneralTransform2DTo3D.cs
- SplineQuaternionKeyFrame.cs
- SafeNativeMethods.cs
- MemoryStream.cs
- RadioButton.cs
- DeclarativeExpressionConditionDeclaration.cs
- Trace.cs
- StackOverflowException.cs
- _SSPISessionCache.cs
- BindableAttribute.cs
- TypefaceMetricsCache.cs
- Substitution.cs
- ObjectListShowCommandsEventArgs.cs
- RequestCacheManager.cs
- DefaultWorkflowSchedulerService.cs
- XmlTextReaderImplHelpers.cs
- ImmComposition.cs
- CodeEventReferenceExpression.cs
- ByteStream.cs
- FontFaceLayoutInfo.cs
- FileSystemWatcher.cs
- DurableEnlistmentState.cs
- Boolean.cs
- mediaclock.cs
- MonthChangedEventArgs.cs
- HttpCookieCollection.cs
- PermissionToken.cs
- ClientOptions.cs
- TypeUsage.cs
- ConfigXmlComment.cs
- GridViewRowPresenter.cs
- DetailsView.cs
- SqlDuplicator.cs
- SiteMapHierarchicalDataSourceView.cs
- SafeEventLogWriteHandle.cs
- CodeSnippetStatement.cs
- ServiceParser.cs
- ActivityTypeDesigner.xaml.cs
- AsymmetricKeyExchangeDeformatter.cs
- WinFormsComponentEditor.cs
- RepeatButton.cs
- MenuItemBindingCollection.cs
- SvcMapFile.cs
- WriteTimeStream.cs
- ServicePointManager.cs
- ValidatingPropertiesEventArgs.cs
- QueueProcessor.cs
- ProgressiveCrcCalculatingStream.cs
- MessageParameterAttribute.cs
- UniqueEventHelper.cs
- ListViewUpdateEventArgs.cs
- DataKeyCollection.cs
- MimeAnyImporter.cs
- EntitySqlException.cs
- Calendar.cs
- TextElement.cs
- Semaphore.cs
- ErrorHandler.cs
- LinkConverter.cs
- Graphics.cs
- DrawingAttributeSerializer.cs
- AudienceUriMode.cs
- FormsIdentity.cs
- WinInetCache.cs
- datacache.cs
- StateWorkerRequest.cs
- sqlinternaltransaction.cs
- ContextMenuService.cs
- DecimalConstantAttribute.cs
- DataGridViewSortCompareEventArgs.cs
- OleDbConnectionInternal.cs
- ScalarType.cs
- TextSearch.cs
- TreeNodeSelectionProcessor.cs
- XmlSchemaAny.cs
- X500Name.cs
- LoginViewDesigner.cs
- ParserContext.cs
- QuotedStringWriteStateInfo.cs
- Zone.cs
- IUnknownConstantAttribute.cs
- OutputWindow.cs
- PassportIdentity.cs
- TreeWalker.cs
- DynamicValueConverter.cs
- ContractValidationHelper.cs
- StateWorkerRequest.cs