Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / ndp / fx / src / xsp / System / Web / Extensions / ui / PostBackTrigger.cs / 3 / PostBackTrigger.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.UI { using System; using System.ComponentModel; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Security.Permissions; using System.Web; using System.Web.UI; using System.Web.Resources; using System.Web.Util; [ AspNetHostingPermission(SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal), AspNetHostingPermission(SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal) ] public class PostBackTrigger : UpdatePanelControlTrigger { private IScriptManagerInternal _scriptManager; public PostBackTrigger() { } internal PostBackTrigger(IScriptManagerInternal scriptManager) { _scriptManager = scriptManager; } [ SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly", MessageId = "ID"), TypeConverter("System.Web.UI.Design.PostBackTriggerControlIDConverter, " + AssemblyRef.SystemWebExtensionsDesign) ] public new string ControlID { get { return base.ControlID; } set { base.ControlID = value; } } internal IScriptManagerInternal ScriptManager { get { if (_scriptManager == null) { Page page = Owner.Page; if (page == null) { throw new InvalidOperationException(AtlasWeb.Common_PageCannotBeNull); } _scriptManager = UI.ScriptManager.GetCurrent(page); if (_scriptManager == null) { throw new InvalidOperationException(String.Format(CultureInfo.InvariantCulture, AtlasWeb.Common_ScriptManagerRequired, Owner.ID)); } } return _scriptManager; } } protected internal override void Initialize() { base.Initialize(); Control associatedControl = FindTargetControl(false); ScriptManager.RegisterPostBackControl(associatedControl); } protected internal override bool HasTriggered() { // This type of trigger never triggers since it causes a regular postback, // where all UpdatePanels render anyway. return false; } [SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")] public override string ToString() { if (String.IsNullOrEmpty(ControlID)) { return "PostBack"; } else { return "PostBack: " + ControlID; } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.UI { using System; using System.ComponentModel; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Security.Permissions; using System.Web; using System.Web.UI; using System.Web.Resources; using System.Web.Util; [ AspNetHostingPermission(SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal), AspNetHostingPermission(SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal) ] public class PostBackTrigger : UpdatePanelControlTrigger { private IScriptManagerInternal _scriptManager; public PostBackTrigger() { } internal PostBackTrigger(IScriptManagerInternal scriptManager) { _scriptManager = scriptManager; } [ SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly", MessageId = "ID"), TypeConverter("System.Web.UI.Design.PostBackTriggerControlIDConverter, " + AssemblyRef.SystemWebExtensionsDesign) ] public new string ControlID { get { return base.ControlID; } set { base.ControlID = value; } } internal IScriptManagerInternal ScriptManager { get { if (_scriptManager == null) { Page page = Owner.Page; if (page == null) { throw new InvalidOperationException(AtlasWeb.Common_PageCannotBeNull); } _scriptManager = UI.ScriptManager.GetCurrent(page); if (_scriptManager == null) { throw new InvalidOperationException(String.Format(CultureInfo.InvariantCulture, AtlasWeb.Common_ScriptManagerRequired, Owner.ID)); } } return _scriptManager; } } protected internal override void Initialize() { base.Initialize(); Control associatedControl = FindTargetControl(false); ScriptManager.RegisterPostBackControl(associatedControl); } protected internal override bool HasTriggered() { // This type of trigger never triggers since it causes a regular postback, // where all UpdatePanels render anyway. return false; } [SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")] public override string ToString() { if (String.IsNullOrEmpty(ControlID)) { return "PostBack"; } else { return "PostBack: " + ControlID; } } } } // 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
- DataChangedEventManager.cs
- ReadOnlyState.cs
- GridViewDeleteEventArgs.cs
- BlurBitmapEffect.cs
- prefixendpointaddressmessagefiltertable.cs
- OuterGlowBitmapEffect.cs
- JumpTask.cs
- Button.cs
- XhtmlCssHandler.cs
- RTTrackingProfile.cs
- WSSecurityOneDotZeroSendSecurityHeader.cs
- RootBrowserWindowProxy.cs
- DBAsyncResult.cs
- RegexMatchCollection.cs
- TagPrefixInfo.cs
- DataGridViewRowHeaderCell.cs
- SystemFonts.cs
- Rect3D.cs
- TimeManager.cs
- SqlIdentifier.cs
- XmlArrayAttribute.cs
- GridItemProviderWrapper.cs
- _SecureChannel.cs
- ZipIOFileItemStream.cs
- Variable.cs
- RankException.cs
- SupportsEventValidationAttribute.cs
- Bits.cs
- MetadataArtifactLoaderResource.cs
- StorageAssociationSetMapping.cs
- BidOverLoads.cs
- InkCanvasSelectionAdorner.cs
- Calendar.cs
- PageVisual.cs
- UmAlQuraCalendar.cs
- MsmqBindingElementBase.cs
- SQLGuidStorage.cs
- WindowsFormsHostAutomationPeer.cs
- InternalDuplexBindingElement.cs
- HitTestFilterBehavior.cs
- CheckBox.cs
- thaishape.cs
- BufferedGraphicsContext.cs
- FontConverter.cs
- SqlExpander.cs
- DataGridItemEventArgs.cs
- XmlSchemaSimpleContentExtension.cs
- VariableBinder.cs
- TdsParserHelperClasses.cs
- HotSpot.cs
- EtwTrackingParticipant.cs
- Content.cs
- Formatter.cs
- ListSortDescriptionCollection.cs
- MimeWriter.cs
- _UriSyntax.cs
- EntityDataSourceContainerNameConverter.cs
- ConfigsHelper.cs
- LogicalExpressionTypeConverter.cs
- VerificationAttribute.cs
- ImageAttributes.cs
- RoutedCommand.cs
- SyntaxCheck.cs
- QueryContinueDragEvent.cs
- SoapTypeAttribute.cs
- QueuePropertyVariants.cs
- TextPointer.cs
- DataSourceProvider.cs
- PathSegmentCollection.cs
- ToolStripRenderEventArgs.cs
- DoubleLinkList.cs
- TimeoutValidationAttribute.cs
- GeneralTransform3DTo2DTo3D.cs
- ValidatedControlConverter.cs
- SelectionChangedEventArgs.cs
- ActiveXHelper.cs
- RewritingPass.cs
- CommandBinding.cs
- XmlHierarchicalEnumerable.cs
- TrackingStringDictionary.cs
- MethodCallTranslator.cs
- MarshalByValueComponent.cs
- XmlSequenceWriter.cs
- HostedBindingBehavior.cs
- XmlFormatExtensionPrefixAttribute.cs
- CompiledQuery.cs
- XmlSignatureProperties.cs
- PackageProperties.cs
- BinaryConverter.cs
- DbParameterCollectionHelper.cs
- EditBehavior.cs
- MenuItem.cs
- DataRowExtensions.cs
- BamlLocalizationDictionary.cs
- DbLambda.cs
- CodeConditionStatement.cs
- NTAccount.cs
- TypefaceCollection.cs
- WebPartHelpVerb.cs
- UInt16Converter.cs