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
- Misc.cs
- ProfilePropertySettingsCollection.cs
- ComponentChangingEvent.cs
- SecurityResources.cs
- FormatConvertedBitmap.cs
- InputLanguageCollection.cs
- WebPartDescriptionCollection.cs
- AbandonedMutexException.cs
- MutexSecurity.cs
- CqlErrorHelper.cs
- UrlMapping.cs
- MdiWindowListItemConverter.cs
- Bits.cs
- SymbolMethod.cs
- SqlMethodTransformer.cs
- WebReference.cs
- SqlBinder.cs
- WithStatement.cs
- BitmapEffectGroup.cs
- ObjectHelper.cs
- SqlProviderServices.cs
- SrgsNameValueTag.cs
- OdbcFactory.cs
- StringCollectionMarkupSerializer.cs
- TextEditorMouse.cs
- FormViewInsertedEventArgs.cs
- PseudoWebRequest.cs
- MetaColumn.cs
- CompositionTarget.cs
- FeatureSupport.cs
- PeerCollaboration.cs
- WebEventTraceProvider.cs
- DoWhileDesigner.xaml.cs
- XmlSecureResolver.cs
- LinqDataView.cs
- compensatingcollection.cs
- DBParameter.cs
- GridErrorDlg.cs
- LocatorPart.cs
- GeneralTransform3DTo2D.cs
- Enum.cs
- FastEncoder.cs
- PackagePartCollection.cs
- EdmTypeAttribute.cs
- PrePostDescendentsWalker.cs
- TimerElapsedEvenArgs.cs
- XXXOnTypeBuilderInstantiation.cs
- TextShapeableCharacters.cs
- SqlVisitor.cs
- WebPartTransformer.cs
- ObjectStateEntryOriginalDbUpdatableDataRecord.cs
- RootDesignerSerializerAttribute.cs
- PropertyMap.cs
- MetadataCacheItem.cs
- SaveFileDialog.cs
- Attributes.cs
- SoapTypeAttribute.cs
- StylusDownEventArgs.cs
- X509RecipientCertificateServiceElement.cs
- returneventsaver.cs
- PointCollectionConverter.cs
- CacheSection.cs
- TextEditorTables.cs
- XPathSelectionIterator.cs
- MethodExpr.cs
- HttpAsyncResult.cs
- ObjectContext.cs
- Bidi.cs
- WorkflowInstance.cs
- GACMembershipCondition.cs
- PackageProperties.cs
- DesignerAdRotatorAdapter.cs
- SplitterCancelEvent.cs
- FilteredSchemaElementLookUpTable.cs
- MDIControlStrip.cs
- DbConnectionPoolGroupProviderInfo.cs
- DictionaryMarkupSerializer.cs
- EventMappingSettings.cs
- Activator.cs
- HttpGetClientProtocol.cs
- GeneralTransform3DCollection.cs
- DataGridViewCellToolTipTextNeededEventArgs.cs
- CodeCatchClause.cs
- ArcSegment.cs
- SecuritySessionSecurityTokenAuthenticator.cs
- ReadOnlyCollection.cs
- ExpressionBuilder.cs
- HttpCacheParams.cs
- HttpApplicationStateBase.cs
- XslCompiledTransform.cs
- TypeViewSchema.cs
- NameTable.cs
- ConfigurationLockCollection.cs
- CodeStatementCollection.cs
- SoapFormatter.cs
- ScheduleChanges.cs
- WebPartConnection.cs
- Pipe.cs
- latinshape.cs
- WebPartHelpVerb.cs