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
- StringArrayConverter.cs
- TraceInternal.cs
- LayoutEvent.cs
- NetStream.cs
- BooleanStorage.cs
- RegisteredExpandoAttribute.cs
- UnsafeNativeMethods.cs
- SupportsEventValidationAttribute.cs
- PopOutPanel.cs
- SafeFindHandle.cs
- LocationSectionRecord.cs
- StylusTip.cs
- MarkupWriter.cs
- AbstractDataSvcMapFileLoader.cs
- HealthMonitoringSectionHelper.cs
- ParamArrayAttribute.cs
- ConfigurationConverterBase.cs
- MetadataItemSerializer.cs
- RemotingSurrogateSelector.cs
- PropertyKey.cs
- InstanceHandleConflictException.cs
- SwitchLevelAttribute.cs
- Int32CollectionValueSerializer.cs
- DataGridViewCellValueEventArgs.cs
- ResXResourceSet.cs
- XPathDocumentNavigator.cs
- ZipIOBlockManager.cs
- CaseStatement.cs
- OracleParameterBinding.cs
- PlainXmlDeserializer.cs
- XmlTextWriter.cs
- SqlUDTStorage.cs
- arclist.cs
- BuildProvider.cs
- QueryInterceptorAttribute.cs
- XmlAggregates.cs
- DrawingImage.cs
- DataServiceExpressionVisitor.cs
- TextRangeEditTables.cs
- CellIdBoolean.cs
- PagedControl.cs
- XamlParser.cs
- COM2Properties.cs
- VideoDrawing.cs
- DrawingAttributeSerializer.cs
- ListChunk.cs
- DataGridViewColumnConverter.cs
- ObjectFullSpanRewriter.cs
- QueryPageSettingsEventArgs.cs
- BaseProcessProtocolHandler.cs
- Compiler.cs
- _DisconnectOverlappedAsyncResult.cs
- ObjectCloneHelper.cs
- MdiWindowListStrip.cs
- DataColumnMappingCollection.cs
- HwndPanningFeedback.cs
- LogicalMethodInfo.cs
- DefaultClaimSet.cs
- SSmlParser.cs
- KnownTypesProvider.cs
- FlowDocumentReader.cs
- FileFormatException.cs
- WasHttpHandlersInstallComponent.cs
- ThicknessConverter.cs
- ReflectTypeDescriptionProvider.cs
- EditorZoneBase.cs
- ButtonFieldBase.cs
- Events.cs
- SamlAudienceRestrictionCondition.cs
- XmlHelper.cs
- Type.cs
- DataTrigger.cs
- SourceFileBuildProvider.cs
- RequestCachingSection.cs
- WorkflowMarkupSerializer.cs
- MessageFilterException.cs
- QilStrConcatenator.cs
- _ChunkParse.cs
- Html32TextWriter.cs
- DoubleLinkList.cs
- RoamingStoreFile.cs
- ContractInstanceProvider.cs
- Camera.cs
- DocumentPageHost.cs
- XmlNodeList.cs
- ThousandthOfEmRealPoints.cs
- GrowingArray.cs
- PkcsUtils.cs
- MenuItem.cs
- ContentDisposition.cs
- ScrollBar.cs
- Vector3DAnimationBase.cs
- ConfigurationManagerHelperFactory.cs
- HMACSHA256.cs
- HandoffBehavior.cs
- WindowsSolidBrush.cs
- MatrixValueSerializer.cs
- HostExecutionContextManager.cs
- SerializerProvider.cs
- FontWeight.cs