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
- GridEntry.cs
- FormatPage.cs
- HttpModuleCollection.cs
- TextBoxBase.cs
- ReflectTypeDescriptionProvider.cs
- EmptyElement.cs
- CaseKeyBox.ViewModel.cs
- linebase.cs
- _HeaderInfoTable.cs
- _UriTypeConverter.cs
- GridViewUpdateEventArgs.cs
- LogRestartAreaEnumerator.cs
- StateBag.cs
- Interlocked.cs
- OdbcEnvironmentHandle.cs
- RegexParser.cs
- IApplicationTrustManager.cs
- XmlWriterTraceListener.cs
- SqlWebEventProvider.cs
- UriWriter.cs
- WinFormsUtils.cs
- StoreItemCollection.cs
- AssemblyCollection.cs
- DomainUpDown.cs
- Codec.cs
- ContentPlaceHolder.cs
- VisualBasicImportReference.cs
- SafeTimerHandle.cs
- SerializationFieldInfo.cs
- SafeBitVector32.cs
- ConnectionPoolManager.cs
- HebrewCalendar.cs
- WebBaseEventKeyComparer.cs
- PrintController.cs
- Int64AnimationBase.cs
- DataGridPagerStyle.cs
- OperationCanceledException.cs
- ApplicationSecurityManager.cs
- UndoManager.cs
- LowerCaseStringConverter.cs
- OutputCacheProviderCollection.cs
- CollectionChangedEventManager.cs
- WindowsMenu.cs
- BaseCollection.cs
- TitleStyle.cs
- AnnotationService.cs
- TemplateKeyConverter.cs
- Soap.cs
- CodeDOMUtility.cs
- XomlCompilerHelpers.cs
- ExpressionBindingCollection.cs
- HttpResponseWrapper.cs
- MessageBox.cs
- DeferredElementTreeState.cs
- VariableQuery.cs
- CodeBlockBuilder.cs
- XmlSchemaSimpleTypeUnion.cs
- PrimarySelectionAdorner.cs
- Model3DGroup.cs
- ToolStripPanelCell.cs
- Vector3DCollectionValueSerializer.cs
- SqlFormatter.cs
- AddInToken.cs
- TextMarkerSource.cs
- RealProxy.cs
- Int64AnimationUsingKeyFrames.cs
- QuaternionRotation3D.cs
- RtfControlWordInfo.cs
- TableProviderWrapper.cs
- PointF.cs
- ImageSourceValueSerializer.cs
- SqlBulkCopyColumnMapping.cs
- RevocationPoint.cs
- RowType.cs
- DataViewListener.cs
- RuntimeConfigurationRecord.cs
- FileSystemWatcher.cs
- SQLInt32Storage.cs
- JavaScriptString.cs
- ServiceOperation.cs
- DbConnectionPool.cs
- PrimaryKeyTypeConverter.cs
- SmtpReplyReader.cs
- Pair.cs
- XmlNullResolver.cs
- CTreeGenerator.cs
- ContentElement.cs
- WorkflowHostingResponseContext.cs
- SrgsGrammarCompiler.cs
- CngUIPolicy.cs
- ECDsaCng.cs
- XmlHierarchicalEnumerable.cs
- XmlJsonReader.cs
- ClientTargetSection.cs
- CommonRemoteMemoryBlock.cs
- RightsManagementUser.cs
- NavigationProperty.cs
- HttpResponseInternalWrapper.cs
- UnsafeNativeMethods.cs
- BamlLocalizableResource.cs