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
- ExpandCollapsePattern.cs
- CodeGroup.cs
- xmlsaver.cs
- XmlUTF8TextWriter.cs
- ModelPerspective.cs
- StaticFileHandler.cs
- ProfileInfo.cs
- SHA256.cs
- TextProperties.cs
- StylusEventArgs.cs
- BindableAttribute.cs
- BinaryConverter.cs
- ScalarOps.cs
- FontDriver.cs
- ListViewDeleteEventArgs.cs
- SQLCharsStorage.cs
- XmlElementAttributes.cs
- LZCodec.cs
- XPathArrayIterator.cs
- UrlMappingCollection.cs
- ImageSource.cs
- _DisconnectOverlappedAsyncResult.cs
- DataControlCommands.cs
- Ticks.cs
- MapPathBasedVirtualPathProvider.cs
- QueuePathDialog.cs
- Clause.cs
- _UriSyntax.cs
- PageClientProxyGenerator.cs
- RenderDataDrawingContext.cs
- DecimalAnimationBase.cs
- TextOutput.cs
- DataGridViewSortCompareEventArgs.cs
- ObjectViewQueryResultData.cs
- WebHttpBindingElement.cs
- Button.cs
- ParallelTimeline.cs
- uribuilder.cs
- Win32Exception.cs
- SystemColors.cs
- SingleTagSectionHandler.cs
- AbstractSvcMapFileLoader.cs
- TcpChannelFactory.cs
- InkPresenter.cs
- HealthMonitoringSection.cs
- TreeNodeStyle.cs
- XmlHelper.cs
- RegexReplacement.cs
- DbConnectionInternal.cs
- LockCookie.cs
- DllNotFoundException.cs
- OletxCommittableTransaction.cs
- ScrollData.cs
- ScrollChrome.cs
- OpCodes.cs
- CircleHotSpot.cs
- DesignerAttribute.cs
- PageBreakRecord.cs
- WebReferencesBuildProvider.cs
- ManualResetEvent.cs
- ToolboxComponentsCreatedEventArgs.cs
- DataTableMappingCollection.cs
- BindingOperations.cs
- TokenDescriptor.cs
- WebPartTransformer.cs
- TdsParserSessionPool.cs
- EventLevel.cs
- CodeMemberMethod.cs
- IPGlobalProperties.cs
- ErrorCodes.cs
- WorkflowMarkupSerializationProvider.cs
- DbParameterCollectionHelper.cs
- LeftCellWrapper.cs
- XmlComment.cs
- Cursor.cs
- ToolCreatedEventArgs.cs
- RedistVersionInfo.cs
- bindurihelper.cs
- PropertyChangedEventArgs.cs
- ComplexPropertyEntry.cs
- TypeListConverter.cs
- ResourceProperty.cs
- StringUtil.cs
- QueryCursorEventArgs.cs
- Line.cs
- ParallelTimeline.cs
- srgsitem.cs
- DocumentProperties.cs
- MaterialGroup.cs
- AdRotator.cs
- ActivitiesCollection.cs
- ObjectListSelectEventArgs.cs
- WmlLiteralTextAdapter.cs
- RSATokenProvider.cs
- ContainerVisual.cs
- ChannelDispatcherCollection.cs
- CodeDefaultValueExpression.cs
- X509Logo.cs
- TextAdaptor.cs
- NavigationProperty.cs