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
- PartialArray.cs
- GeneralTransform2DTo3DTo2D.cs
- RefreshPropertiesAttribute.cs
- GenericUriParser.cs
- WorkflowTraceTransfer.cs
- StyleHelper.cs
- ProtocolElementCollection.cs
- SourceItem.cs
- PostBackOptions.cs
- CommaDelimitedStringAttributeCollectionConverter.cs
- InputManager.cs
- TextViewSelectionProcessor.cs
- EntityException.cs
- ObjectDisposedException.cs
- MethodAccessException.cs
- SizeLimitedCache.cs
- MonitorWrapper.cs
- ZipIOLocalFileDataDescriptor.cs
- InvalidProgramException.cs
- XmlEventCache.cs
- webeventbuffer.cs
- HttpListenerContext.cs
- DnsCache.cs
- HandlerBase.cs
- PageWrapper.cs
- ParallelTimeline.cs
- ComponentDispatcher.cs
- Rijndael.cs
- DesignerToolStripControlHost.cs
- TransactionScope.cs
- MessageLogTraceRecord.cs
- WebPartConnectionsDisconnectVerb.cs
- RegexParser.cs
- ExpressionLexer.cs
- CompoundFileIOPermission.cs
- InvalidPropValue.cs
- TransformPattern.cs
- Asn1IntegerConverter.cs
- XmlWrappingReader.cs
- ActionItem.cs
- FilteredAttributeCollection.cs
- DurableInstanceProvider.cs
- ImportOptions.cs
- StringUtil.cs
- Helpers.cs
- Thread.cs
- FormCollection.cs
- MaterialGroup.cs
- EndpointInstanceProvider.cs
- SID.cs
- SchemaElementDecl.cs
- VirtualizedItemProviderWrapper.cs
- MSAANativeProvider.cs
- odbcmetadatacollectionnames.cs
- BrowserCapabilitiesCompiler.cs
- ExpressionPrefixAttribute.cs
- CreateUserErrorEventArgs.cs
- FileSystemWatcher.cs
- _NetRes.cs
- httpapplicationstate.cs
- ThreadPool.cs
- isolationinterop.cs
- EnumValAlphaComparer.cs
- PTConverter.cs
- Win32SafeHandles.cs
- PseudoWebRequest.cs
- PkcsMisc.cs
- SafeNativeMethods.cs
- EmptyStringExpandableObjectConverter.cs
- DrawingDrawingContext.cs
- PenContext.cs
- SchemaManager.cs
- AuthenticatedStream.cs
- StylusEventArgs.cs
- MultilineStringConverter.cs
- OpenFileDialog.cs
- FixedSOMTextRun.cs
- ListViewAutomationPeer.cs
- BitmapEffectGroup.cs
- ImageMapEventArgs.cs
- Comparer.cs
- ControlAdapter.cs
- CodeTypeReferenceSerializer.cs
- XamlFilter.cs
- XmlSchemaSimpleContentRestriction.cs
- XmlMembersMapping.cs
- DataViewListener.cs
- DataDocumentXPathNavigator.cs
- KeyedHashAlgorithm.cs
- OleDbParameter.cs
- IApplicationTrustManager.cs
- CurrentChangedEventManager.cs
- FormsAuthenticationTicket.cs
- AutomationPatternInfo.cs
- SubpageParaClient.cs
- PocoEntityKeyStrategy.cs
- CapiSafeHandles.cs
- ToolStripItemClickedEventArgs.cs
- ArrayListCollectionBase.cs
- SafeBitVector32.cs