Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / xsp / System / Web / UI / WebControls / ValidatorCompatibilityHelper.cs / 1305376 / 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
- SiteMapDesignerDataSourceView.cs
- PropertyDescriptorComparer.cs
- AutomationEventArgs.cs
- CqlIdentifiers.cs
- MetadataProperty.cs
- FixedTextBuilder.cs
- ProcessHostServerConfig.cs
- MimeWriter.cs
- ModelItemDictionaryImpl.cs
- WebServiceBindingAttribute.cs
- OleDbEnumerator.cs
- SubstitutionList.cs
- Vector3DCollectionValueSerializer.cs
- LogicalMethodInfo.cs
- SoapObjectInfo.cs
- PolicyLevel.cs
- FloatUtil.cs
- ALinqExpressionVisitor.cs
- SqlInfoMessageEvent.cs
- ToolStripButton.cs
- FileLevelControlBuilderAttribute.cs
- QuotedPrintableStream.cs
- TextBox.cs
- ForeignConstraint.cs
- CompileLiteralTextParser.cs
- BamlRecordWriter.cs
- MultipartContentParser.cs
- PersonalizationProviderHelper.cs
- StringInfo.cs
- SqlGatherProducedAliases.cs
- HiddenField.cs
- MarshalDirectiveException.cs
- AutoResetEvent.cs
- SendKeys.cs
- XPathException.cs
- SystemEvents.cs
- DeobfuscatingStream.cs
- UrlMapping.cs
- XmlSignificantWhitespace.cs
- XmlSchemaSimpleTypeList.cs
- Matrix3DValueSerializer.cs
- XmlCharCheckingWriter.cs
- GridItemCollection.cs
- ThreadStaticAttribute.cs
- PropertyGridEditorPart.cs
- DeclarationUpdate.cs
- FormatterServices.cs
- GiveFeedbackEvent.cs
- SqlConnectionHelper.cs
- DetailsViewRowCollection.cs
- ProtectedConfigurationSection.cs
- OutputCacheSection.cs
- FieldAccessException.cs
- UnauthorizedAccessException.cs
- WebPartConnectionsDisconnectVerb.cs
- RoleGroupCollection.cs
- ServiceHandle.cs
- BitmapFrameEncode.cs
- smtpconnection.cs
- WindowsSpinner.cs
- JsonFormatGeneratorStatics.cs
- URL.cs
- CodeArgumentReferenceExpression.cs
- DependencyPropertyAttribute.cs
- DataGridViewEditingControlShowingEventArgs.cs
- FromReply.cs
- OrderedDictionary.cs
- ConnectionStringSettingsCollection.cs
- RemotingSurrogateSelector.cs
- DataGridViewComboBoxCell.cs
- WebServiceClientProxyGenerator.cs
- ShaderEffect.cs
- RegexParser.cs
- HandlerMappingMemo.cs
- HttpServerUtilityBase.cs
- Transform3DGroup.cs
- ByteStream.cs
- HttpModuleAction.cs
- DaylightTime.cs
- UnaryNode.cs
- HtmlTableRow.cs
- ActivityInstance.cs
- QilFunction.cs
- PeerNameRecordCollection.cs
- StringWriter.cs
- SigningCredentials.cs
- XmlAttributeOverrides.cs
- HtmlInputButton.cs
- DataTableTypeConverter.cs
- Point3DCollection.cs
- ModelTreeEnumerator.cs
- UnsettableComboBox.cs
- TogglePatternIdentifiers.cs
- PackWebRequestFactory.cs
- URLString.cs
- DataFieldEditor.cs
- IisTraceListener.cs
- ConvertBinder.cs
- TableNameAttribute.cs
- Geometry3D.cs