Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / ndp / fx / src / xsp / System / Web / UI / WebControls / ValidatorCompatibilityHelper.cs / 3 / 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}); } } }
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- Assembly.cs
- SchemaElement.cs
- ToolBarOverflowPanel.cs
- login.cs
- ButtonRenderer.cs
- DesignTimeTemplateParser.cs
- AsynchronousChannelMergeEnumerator.cs
- CapabilitiesUse.cs
- TextSchema.cs
- ResourceManager.cs
- JournalEntryStack.cs
- DataObjectAttribute.cs
- SimpleWebHandlerParser.cs
- TimeBoundedCache.cs
- XsltContext.cs
- WebResourceUtil.cs
- TaskDesigner.cs
- RectAnimation.cs
- HttpCookieCollection.cs
- WebBrowserProgressChangedEventHandler.cs
- InvalidCastException.cs
- DataRowComparer.cs
- MatrixCamera.cs
- DocumentPageTextView.cs
- RightNameExpirationInfoPair.cs
- ItemPager.cs
- HtmlEmptyTagControlBuilder.cs
- InfocardInteractiveChannelInitializer.cs
- BooleanKeyFrameCollection.cs
- DataServiceRequestArgs.cs
- UInt64Storage.cs
- HttpMethodAttribute.cs
- Translator.cs
- MembershipUser.cs
- DataGridViewRowsAddedEventArgs.cs
- WebScriptClientGenerator.cs
- CacheRequest.cs
- RowParagraph.cs
- SqlMultiplexer.cs
- ToolStripSeparator.cs
- PathGeometry.cs
- ColumnHeaderCollectionEditor.cs
- SingleAnimationBase.cs
- InstanceDataCollectionCollection.cs
- UITypeEditors.cs
- WaitHandle.cs
- InternalTypeHelper.cs
- MenuTracker.cs
- InsufficientMemoryException.cs
- DialogResultConverter.cs
- EventItfInfo.cs
- EntityDataSourceContextCreatedEventArgs.cs
- RegexCompiler.cs
- SequentialWorkflowRootDesigner.cs
- TypeDescriptor.cs
- WmpBitmapDecoder.cs
- Monitor.cs
- CodeBinaryOperatorExpression.cs
- CharacterHit.cs
- CodeDOMUtility.cs
- SocketInformation.cs
- BCLDebug.cs
- EntityProviderServices.cs
- ExtentKey.cs
- ToolStripPanel.cs
- HTTPRemotingHandler.cs
- XmlChoiceIdentifierAttribute.cs
- SolidBrush.cs
- DropSource.cs
- ArrayList.cs
- TdsRecordBufferSetter.cs
- ByteArrayHelperWithString.cs
- HTMLTagNameToTypeMapper.cs
- VersionedStreamOwner.cs
- DependsOnAttribute.cs
- HexParser.cs
- PersonalizationProviderCollection.cs
- WebBrowserEvent.cs
- FileAuthorizationModule.cs
- EncoderReplacementFallback.cs
- GAC.cs
- EmptyControlCollection.cs
- DataServiceQueryProvider.cs
- DataGridViewBindingCompleteEventArgs.cs
- PreservationFileWriter.cs
- PopupRootAutomationPeer.cs
- IndicFontClient.cs
- StaticFileHandler.cs
- InstanceCollisionException.cs
- DesignBinding.cs
- XmlRawWriter.cs
- BeginEvent.cs
- hresults.cs
- StringValueConverter.cs
- TransportSecurityBindingElement.cs
- XmlQualifiedNameTest.cs
- HttpModulesSection.cs
- SymbolDocumentGenerator.cs
- XmlTextReader.cs
- TheQuery.cs