Code:
/ FXUpdate3074 / FXUpdate3074 / 1.1 / untmp / whidbey / QFE / ndp / fx / src / xsp / System / Web / UI / WebControls / ValidatorCompatibilityHelper.cs / 2 / 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.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- SendActivityEventArgs.cs
- DesignerAutoFormatCollection.cs
- Calendar.cs
- SafeCloseHandleCritical.cs
- DataGridViewRowPrePaintEventArgs.cs
- MenuAutomationPeer.cs
- TraceLevelHelper.cs
- FixedSOMTextRun.cs
- SoapCommonClasses.cs
- VerificationException.cs
- documentation.cs
- SchemaNotation.cs
- AuthenticationManager.cs
- LinearKeyFrames.cs
- DesignerEditorPartChrome.cs
- ListBase.cs
- DefaultPrintController.cs
- BamlLocalizableResourceKey.cs
- HtmlElementErrorEventArgs.cs
- AuthorizationContext.cs
- ObjectView.cs
- Authorization.cs
- HebrewNumber.cs
- XmlDocumentType.cs
- XPathDocumentBuilder.cs
- ObjectMemberMapping.cs
- GuidelineSet.cs
- TdsParserStaticMethods.cs
- Camera.cs
- TrustSection.cs
- ConstraintStruct.cs
- FragmentNavigationEventArgs.cs
- Transform3D.cs
- XmlILAnnotation.cs
- DataGridViewRowsRemovedEventArgs.cs
- IncrementalReadDecoders.cs
- DataProtection.cs
- ContextProperty.cs
- DataTableClearEvent.cs
- bindurihelper.cs
- Transform.cs
- EnumType.cs
- SafeProcessHandle.cs
- AutoCompleteStringCollection.cs
- AnnouncementDispatcherAsyncResult.cs
- HttpRequestTraceRecord.cs
- XmlMembersMapping.cs
- TaskFormBase.cs
- ArglessEventHandlerProxy.cs
- RoutedEventHandlerInfo.cs
- SoapInteropTypes.cs
- StringKeyFrameCollection.cs
- SecurityCookieModeValidator.cs
- GrammarBuilderPhrase.cs
- TextBlockAutomationPeer.cs
- ReflectionPermission.cs
- TabControlEvent.cs
- IHttpResponseInternal.cs
- XDeferredAxisSource.cs
- ACE.cs
- XmlUtil.cs
- XPathMultyIterator.cs
- ConnectionStringsExpressionBuilder.cs
- RegistrySecurity.cs
- RIPEMD160.cs
- CustomAttributeSerializer.cs
- RtfControlWordInfo.cs
- SplineQuaternionKeyFrame.cs
- WorkflowClientDeliverMessageWrapper.cs
- ParseNumbers.cs
- ListDictionaryInternal.cs
- GcHandle.cs
- DataGridViewColumnCollection.cs
- TrailingSpaceComparer.cs
- SrgsGrammarCompiler.cs
- Logging.cs
- DBBindings.cs
- FastEncoder.cs
- RoleService.cs
- EditableTreeList.cs
- KnownBoxes.cs
- HandleRef.cs
- ClientRolePrincipal.cs
- WebPartChrome.cs
- RSAPKCS1SignatureDeformatter.cs
- LayoutManager.cs
- Vector3DCollectionConverter.cs
- Journal.cs
- InstanceCreationEditor.cs
- GeneralTransform3D.cs
- UriTemplateTable.cs
- CharacterBuffer.cs
- StrongNameKeyPair.cs
- TimeStampChecker.cs
- ExpanderAutomationPeer.cs
- ChameleonKey.cs
- GenericEnumerator.cs
- DeclaredTypeElement.cs
- DbParameterCollectionHelper.cs
- SoapIgnoreAttribute.cs