Code:
/ FXUpdate3074 / FXUpdate3074 / 1.1 / untmp / whidbey / QFE / ndp / fx / src / xsp / System / Web / UI / WebControls / ValidatorCompatibilityHelper.cs / 2 / 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.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- ScrollBar.cs
- TemplateControlCodeDomTreeGenerator.cs
- RepeaterItemCollection.cs
- DisplayNameAttribute.cs
- ServicePointManagerElement.cs
- WindowsProgressbar.cs
- ToolStripMenuItemCodeDomSerializer.cs
- SchemaImporterExtension.cs
- DoWorkEventArgs.cs
- FontFamily.cs
- OrderedEnumerableRowCollection.cs
- ButtonFlatAdapter.cs
- ContextProperty.cs
- Assembly.cs
- TypeLoadException.cs
- XsltException.cs
- XmlEnumAttribute.cs
- DataGridViewRowEventArgs.cs
- ReflectionUtil.cs
- PropertyNames.cs
- NumericUpDownAccelerationCollection.cs
- MulticastNotSupportedException.cs
- DocumentReferenceCollection.cs
- GroupQuery.cs
- XmlSchemaSimpleContent.cs
- AutomationPropertyInfo.cs
- DbConnectionPoolOptions.cs
- HtmlEncodedRawTextWriter.cs
- RoutingEndpointTrait.cs
- CompositeCollection.cs
- safelinkcollection.cs
- XmlSchemaObject.cs
- BinaryObjectReader.cs
- ObjectStateEntryBaseUpdatableDataRecord.cs
- GrammarBuilderWildcard.cs
- CommonXSendMessage.cs
- DeclaredTypeValidatorAttribute.cs
- LogRecordSequence.cs
- BaseTemplateBuildProvider.cs
- PenThread.cs
- CodeStatement.cs
- FolderBrowserDialog.cs
- CodeDOMUtility.cs
- FormViewCommandEventArgs.cs
- ThreadInterruptedException.cs
- Color.cs
- UserUseLicenseDictionaryLoader.cs
- ServiceRoute.cs
- UpdateProgress.cs
- ObjectStateFormatter.cs
- MarkupExtensionParser.cs
- PostBackTrigger.cs
- ArraySegment.cs
- FileInfo.cs
- TrackingRecordPreFilter.cs
- CustomErrorsSection.cs
- _FtpControlStream.cs
- DataGridViewComboBoxEditingControl.cs
- ToolboxComponentsCreatingEventArgs.cs
- exports.cs
- AutomationElement.cs
- ObjectListSelectEventArgs.cs
- XmlObjectSerializerContext.cs
- ChannelTokenTypeConverter.cs
- AttachedAnnotationChangedEventArgs.cs
- FloatUtil.cs
- SQLInt64.cs
- ViewKeyConstraint.cs
- CellQuery.cs
- XamlStream.cs
- ReliabilityContractAttribute.cs
- XmlSchemaResource.cs
- BitmapEffectOutputConnector.cs
- BuildResultCache.cs
- ISAPIWorkerRequest.cs
- ContentHostHelper.cs
- MobileTemplatedControlDesigner.cs
- OutputCacheSection.cs
- WebReferencesBuildProvider.cs
- XmlSchemaExporter.cs
- UmAlQuraCalendar.cs
- TableCell.cs
- InkCanvasAutomationPeer.cs
- StackOverflowException.cs
- BufferedWebEventProvider.cs
- TraceLog.cs
- StorageComplexTypeMapping.cs
- securitycriticaldataClass.cs
- GroupBox.cs
- DynamicResourceExtensionConverter.cs
- OdbcException.cs
- ProcessHost.cs
- WebPartConnectionCollection.cs
- StringResourceManager.cs
- AttributeXamlType.cs
- RequestCachingSection.cs
- FontStretchConverter.cs
- BitmapEffectDrawing.cs
- adornercollection.cs
- StateMachineWorkflowInstance.cs