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
- IPAddress.cs
- Part.cs
- MailMessageEventArgs.cs
- SqlInternalConnection.cs
- MulticastDelegate.cs
- NameObjectCollectionBase.cs
- XmlSchemaDatatype.cs
- HttpPostProtocolReflector.cs
- Padding.cs
- XhtmlBasicPanelAdapter.cs
- EmptyEnumerator.cs
- xmlglyphRunInfo.cs
- SpeechAudioFormatInfo.cs
- ToolStripSplitStackLayout.cs
- HtmlInputHidden.cs
- DataControlFieldCell.cs
- ComplexTypeEmitter.cs
- ListViewTableCell.cs
- InheritanceAttribute.cs
- TemplateApplicationHelper.cs
- XmlStringTable.cs
- ContractInstanceProvider.cs
- WCFBuildProvider.cs
- PageAsyncTask.cs
- ConsoleKeyInfo.cs
- PropertyCondition.cs
- ComPlusAuthorization.cs
- IRCollection.cs
- DivideByZeroException.cs
- DefaultTraceListener.cs
- XmlDocumentFragment.cs
- HtmlEmptyTagControlBuilder.cs
- PolicyException.cs
- ValidationSettings.cs
- ToolStripLabel.cs
- EventDescriptor.cs
- WizardStepBase.cs
- WebReferencesBuildProvider.cs
- Misc.cs
- ResizeGrip.cs
- WriteFileContext.cs
- MD5Cng.cs
- BamlWriter.cs
- ListItemCollection.cs
- ClientSideQueueItem.cs
- XmlSchemaValidator.cs
- SeekStoryboard.cs
- TextSelectionHelper.cs
- ViewGenerator.cs
- MsdtcClusterUtils.cs
- ThreadAttributes.cs
- Compiler.cs
- CreateParams.cs
- InternalsVisibleToAttribute.cs
- ObjectSecurity.cs
- BaseAsyncResult.cs
- OutKeywords.cs
- ExpressionVisitorHelpers.cs
- Vector3DAnimationUsingKeyFrames.cs
- ClientSettings.cs
- RoleServiceManager.cs
- FixedPageAutomationPeer.cs
- DataGridDefaultColumnWidthTypeConverter.cs
- FileCodeGroup.cs
- SessionParameter.cs
- RawStylusInputCustomDataList.cs
- MaskPropertyEditor.cs
- StrokeCollectionDefaultValueFactory.cs
- TargetInvocationException.cs
- ComponentConverter.cs
- OrderByQueryOptionExpression.cs
- AppearanceEditorPart.cs
- CustomErrorsSection.cs
- JoinElimination.cs
- ImageListDesigner.cs
- SymbolDocumentGenerator.cs
- RelationshipType.cs
- CheckBoxBaseAdapter.cs
- ByteStack.cs
- Timer.cs
- AsymmetricCryptoHandle.cs
- BitmapDownload.cs
- TimeStampChecker.cs
- WindowsStartMenu.cs
- SimpleHandlerFactory.cs
- CheckPair.cs
- XmlSchemaException.cs
- TextProperties.cs
- HttpCacheParams.cs
- SecurityTokenProviderContainer.cs
- NativeRecognizer.cs
- TypeConverterAttribute.cs
- MaterialGroup.cs
- QueryStringConverter.cs
- WmlTextBoxAdapter.cs
- HashHelper.cs
- UnsafeNativeMethodsTablet.cs
- XmlAnyElementAttribute.cs
- TemplateBindingExpression.cs
- ReceiveReply.cs