Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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}); } } } // 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
- CmsInterop.cs
- QilCloneVisitor.cs
- SpanIndex.cs
- ISAPIWorkerRequest.cs
- ProbeDuplexCD1AsyncResult.cs
- URLIdentityPermission.cs
- WebPartZoneCollection.cs
- TextTreeDeleteContentUndoUnit.cs
- FullTextBreakpoint.cs
- ReadOnlyCollectionBase.cs
- Boolean.cs
- ParallelActivityDesigner.cs
- OpenTypeCommon.cs
- WebPartMinimizeVerb.cs
- _AcceptOverlappedAsyncResult.cs
- PostBackOptions.cs
- NumericUpDownAcceleration.cs
- CompiledRegexRunnerFactory.cs
- SyncOperationState.cs
- SynchronizationFilter.cs
- PageThemeCodeDomTreeGenerator.cs
- SerialStream.cs
- AttachedPropertyBrowsableForTypeAttribute.cs
- RemoteWebConfigurationHostServer.cs
- CommandManager.cs
- DefaultValueAttribute.cs
- DataTableReaderListener.cs
- UTF32Encoding.cs
- ReturnType.cs
- EmptyTextWriter.cs
- OperationDescription.cs
- MultiPropertyDescriptorGridEntry.cs
- WindowCollection.cs
- CqlGenerator.cs
- ModelTreeManager.cs
- Membership.cs
- SplitContainer.cs
- ProgressChangedEventArgs.cs
- ContainerFilterService.cs
- HtmlHistory.cs
- AxImporter.cs
- TextServicesDisplayAttributePropertyRanges.cs
- MemoryResponseElement.cs
- InheritablePropertyChangeInfo.cs
- XPathMessageFilterElement.cs
- PageParserFilter.cs
- FileDialog_Vista_Interop.cs
- ResourceCodeDomSerializer.cs
- ClientApiGenerator.cs
- StorageTypeMapping.cs
- PrintPreviewGraphics.cs
- OleDbCommand.cs
- ObjectAnimationBase.cs
- ClientBuildManager.cs
- EntitySet.cs
- ChtmlSelectionListAdapter.cs
- TrackingQueryElement.cs
- DependencyProperty.cs
- CodeGroup.cs
- FieldNameLookup.cs
- MailAddressCollection.cs
- DaylightTime.cs
- ResourceAssociationTypeEnd.cs
- ComponentGuaranteesAttribute.cs
- Size3D.cs
- HtmlUtf8RawTextWriter.cs
- TableCell.cs
- WebSysDefaultValueAttribute.cs
- DataGridViewCellParsingEventArgs.cs
- ProgressBarBrushConverter.cs
- TcpTransportBindingElement.cs
- ServiceContractGenerationContext.cs
- ExpressionBuilderCollection.cs
- UrlAuthorizationModule.cs
- TagMapInfo.cs
- SqlDataSourceRefreshSchemaForm.cs
- GACIdentityPermission.cs
- HandlerMappingMemo.cs
- ConfigXmlElement.cs
- RtfToXamlReader.cs
- XmlUTF8TextWriter.cs
- DoubleAnimationUsingPath.cs
- DataControlFieldsEditor.cs
- DeclarativeCatalogPart.cs
- WhiteSpaceTrimStringConverter.cs
- StdValidatorsAndConverters.cs
- FilterableAttribute.cs
- CodeArgumentReferenceExpression.cs
- PrimitiveCodeDomSerializer.cs
- WindowInteractionStateTracker.cs
- ByteAnimationBase.cs
- TextDecorationCollection.cs
- SqlSelectStatement.cs
- HttpAsyncResult.cs
- MenuItemAutomationPeer.cs
- XmlSchemaSet.cs
- ReferentialConstraintRoleElement.cs
- SmiEventStream.cs
- DataService.cs
- WCFModelStrings.Designer.cs