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
- BidOverLoads.cs
- TypeFieldSchema.cs
- ConfigXmlSignificantWhitespace.cs
- PersonalizableAttribute.cs
- CharacterBufferReference.cs
- M3DUtil.cs
- IntSecurity.cs
- SchemaObjectWriter.cs
- ActivityDesigner.cs
- StorageConditionPropertyMapping.cs
- FrameworkElementFactoryMarkupObject.cs
- LinqDataSource.cs
- XamlTreeBuilder.cs
- FormsIdentity.cs
- XmlILCommand.cs
- UncommonField.cs
- XmlFormatExtensionPrefixAttribute.cs
- ServiceDescriptions.cs
- ScriptingRoleServiceSection.cs
- x509store.cs
- WebExceptionStatus.cs
- SerializationException.cs
- OrCondition.cs
- Message.cs
- StaticResourceExtension.cs
- SoapObjectInfo.cs
- DataObject.cs
- ArithmeticException.cs
- DataGridViewElement.cs
- RegistryPermission.cs
- AnnotationMap.cs
- DocComment.cs
- ObservableCollection.cs
- LineBreakRecord.cs
- HTTPNotFoundHandler.cs
- NativeMethods.cs
- DashStyles.cs
- RbTree.cs
- OdbcCommand.cs
- _NTAuthentication.cs
- XpsS0ValidatingLoader.cs
- ButtonAutomationPeer.cs
- EntityConnectionStringBuilder.cs
- StreamGeometry.cs
- CustomAttributeFormatException.cs
- SynchronizationLockException.cs
- EmissiveMaterial.cs
- BamlRecordWriter.cs
- ToolStripDropDownClosingEventArgs.cs
- EventTrigger.cs
- Fault.cs
- TypeElementCollection.cs
- InputLanguageSource.cs
- _NativeSSPI.cs
- TreeViewCancelEvent.cs
- DeferredReference.cs
- ConstNode.cs
- IFlowDocumentViewer.cs
- UserControlParser.cs
- LocalizationCodeDomSerializer.cs
- ScrollProperties.cs
- TypeNameConverter.cs
- CornerRadiusConverter.cs
- DrawingVisualDrawingContext.cs
- BasicSecurityProfileVersion.cs
- DataGridViewTopLeftHeaderCell.cs
- XmlSchemaDocumentation.cs
- QueryOptionExpression.cs
- NullNotAllowedCollection.cs
- FixedSOMTableCell.cs
- EnumUnknown.cs
- DeviceContext2.cs
- OledbConnectionStringbuilder.cs
- Utils.cs
- PageTheme.cs
- SafeReadContext.cs
- SocketPermission.cs
- Bold.cs
- RepeatBehaviorConverter.cs
- HwndProxyElementProvider.cs
- WebServiceTypeData.cs
- HttpHandler.cs
- RelationshipType.cs
- FrameworkEventSource.cs
- WebServiceData.cs
- FixedDocumentPaginator.cs
- Utils.cs
- ZipFileInfo.cs
- PathFigure.cs
- SpAudioStreamWrapper.cs
- TableChangeProcessor.cs
- CultureInfo.cs
- StructuredProperty.cs
- securitycriticaldataformultiplegetandset.cs
- TargetConverter.cs
- GridItem.cs
- TraceContextEventArgs.cs
- TextSpanModifier.cs
- EntityDesignerUtils.cs
- DependencyPropertyAttribute.cs