Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / ndp / fx / src / xsp / System / Web / UI / WebControls / ValidatorCompatibilityHelper.cs / 1 / 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
- PathGeometry.cs
- ReflectionHelper.cs
- PackUriHelper.cs
- CurrentTimeZone.cs
- BindStream.cs
- TraceListener.cs
- SystemUdpStatistics.cs
- StreamUpdate.cs
- TreeViewAutomationPeer.cs
- SqlParameter.cs
- UriTemplateHelpers.cs
- CompilerInfo.cs
- ArraySortHelper.cs
- DataGridColumnFloatingHeader.cs
- NativeMethods.cs
- ComplexTypeEmitter.cs
- XmlSchemaComplexContentExtension.cs
- SerialPort.cs
- DataGridViewColumn.cs
- DataGridViewComboBoxColumnDesigner.cs
- EventLogPermissionAttribute.cs
- RecognitionResult.cs
- ResourceIDHelper.cs
- HandlerMappingMemo.cs
- LayoutTable.cs
- TraceData.cs
- AxWrapperGen.cs
- __Filters.cs
- Drawing.cs
- MethodBuilderInstantiation.cs
- FileDataSourceCache.cs
- ChangeNode.cs
- SystemMulticastIPAddressInformation.cs
- UdpSocket.cs
- OutputCacheModule.cs
- UIPropertyMetadata.cs
- FolderBrowserDialog.cs
- TimeSpanValidatorAttribute.cs
- BindToObject.cs
- QilPatternFactory.cs
- FieldBuilder.cs
- UnsafeNativeMethods.cs
- VersionedStream.cs
- IPAddress.cs
- Version.cs
- SubtreeProcessor.cs
- ParenthesizePropertyNameAttribute.cs
- MethodExpr.cs
- SqlCacheDependencyDatabase.cs
- OleDbMetaDataFactory.cs
- DiscreteKeyFrames.cs
- Exceptions.cs
- Tuple.cs
- WizardStepBase.cs
- PlanCompilerUtil.cs
- LateBoundBitmapDecoder.cs
- SimpleBitVector32.cs
- SizeAnimationClockResource.cs
- BindingMemberInfo.cs
- WebPartHelpVerb.cs
- SmtpCommands.cs
- StyleXamlTreeBuilder.cs
- LayoutEngine.cs
- CheckBoxBaseAdapter.cs
- TimerElapsedEvenArgs.cs
- DatePickerTextBox.cs
- LabelLiteral.cs
- printdlgexmarshaler.cs
- HttpApplicationFactory.cs
- ZipIOCentralDirectoryDigitalSignature.cs
- FixedDocumentSequencePaginator.cs
- FirewallWrapper.cs
- ImageKeyConverter.cs
- UInt16.cs
- TileBrush.cs
- AsyncResult.cs
- UshortList2.cs
- ConfigXmlElement.cs
- BinaryMethodMessage.cs
- ListBindingConverter.cs
- OleDbEnumerator.cs
- TreeNodeStyleCollection.cs
- CompiledRegexRunner.cs
- ToolStripOverflow.cs
- XmlDictionaryReader.cs
- PreProcessInputEventArgs.cs
- EnterpriseServicesHelper.cs
- ParameterCollection.cs
- CheckoutException.cs
- HtmlContainerControl.cs
- CodeTypeDeclarationCollection.cs
- XsdDuration.cs
- InitializerFacet.cs
- DataGridParentRows.cs
- XMLSyntaxException.cs
- BookmarkOptionsHelper.cs
- ProviderConnectionPointCollection.cs
- GeneralTransform3D.cs
- TextRangeEditTables.cs
- ScrollChrome.cs