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
- IndexedWhereQueryOperator.cs
- QueryCursorEventArgs.cs
- MultiBindingExpression.cs
- ISO2022Encoding.cs
- AuthenticationSection.cs
- XmlRawWriter.cs
- ToolStripSplitButton.cs
- TickBar.cs
- FixedTextPointer.cs
- DateTimeFormatInfo.cs
- MouseGestureValueSerializer.cs
- DataMemberAttribute.cs
- PrintPageEvent.cs
- MenuItem.cs
- ButtonChrome.cs
- XPathNodeList.cs
- TransformationRules.cs
- LocalizationCodeDomSerializer.cs
- SQLDecimal.cs
- MaskPropertyEditor.cs
- SQLMoney.cs
- ArgumentOutOfRangeException.cs
- SimpleMailWebEventProvider.cs
- SmtpMail.cs
- AdCreatedEventArgs.cs
- ShaderRenderModeValidation.cs
- VerticalAlignConverter.cs
- DesignBinding.cs
- HashMembershipCondition.cs
- SimpleTextLine.cs
- _BaseOverlappedAsyncResult.cs
- WindowsAuthenticationModule.cs
- MediaElementAutomationPeer.cs
- GeneralTransform3DTo2D.cs
- SettingsPropertyValueCollection.cs
- SBCSCodePageEncoding.cs
- PeerTransportListenAddressValidatorAttribute.cs
- TaiwanCalendar.cs
- PlaceHolder.cs
- MsmqChannelFactoryBase.cs
- CommandLineParser.cs
- Exception.cs
- XmlSerializerVersionAttribute.cs
- SkipStoryboardToFill.cs
- ConfigXmlAttribute.cs
- StringStorage.cs
- LocalFileSettingsProvider.cs
- UrlAuthorizationModule.cs
- BitmapCodecInfoInternal.cs
- ModelTreeEnumerator.cs
- WebReferenceCollection.cs
- _ShellExpression.cs
- Utility.cs
- GridViewColumn.cs
- GlobalAclOperationRequirement.cs
- SplitContainerDesigner.cs
- RoutedEvent.cs
- HtmlImage.cs
- URLString.cs
- Attributes.cs
- SoapObjectReader.cs
- ProgressBarRenderer.cs
- PrintDialog.cs
- WindowsComboBox.cs
- mediapermission.cs
- TimeoutException.cs
- TemplateBamlRecordReader.cs
- WebPartDeleteVerb.cs
- GenericUriParser.cs
- SessionStateModule.cs
- DataGridColumnCollectionEditor.cs
- MatrixTransform.cs
- LoginNameDesigner.cs
- ISO2022Encoding.cs
- GlobalizationAssembly.cs
- URLMembershipCondition.cs
- NonBatchDirectoryCompiler.cs
- XamlClipboardData.cs
- CardSpaceShim.cs
- OutputCacheModule.cs
- ConfigXmlElement.cs
- FileUtil.cs
- DSASignatureDeformatter.cs
- SHA256.cs
- Connector.cs
- ConfigurationLocation.cs
- ProcessDesigner.cs
- WebPartMenuStyle.cs
- FunctionMappingTranslator.cs
- DiscoveryServerProtocol.cs
- ImageAnimator.cs
- CollectionBase.cs
- StringFunctions.cs
- MultiBindingExpression.cs
- XPathSingletonIterator.cs
- FileDialogCustomPlacesCollection.cs
- WebHeaderCollection.cs
- HwndStylusInputProvider.cs
- SqlDataSourceQuery.cs
- cookiecollection.cs