Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / xsp / System / Extensions / UI / PostBackTrigger.cs / 1305376 / 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.Web; using System.Web.UI; using System.Web.Resources; using System.Web.Util; 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.Web; using System.Web.UI; using System.Web.Resources; using System.Web.Util; 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
- SuppressMergeCheckAttribute.cs
- StackSpiller.Generated.cs
- ImageListImageEditor.cs
- WebRequestModuleElementCollection.cs
- NativeMethodsCLR.cs
- GraphicsPathIterator.cs
- DataSourceControl.cs
- MachineKeyConverter.cs
- TransactionFormatter.cs
- LinqDataSourceDisposeEventArgs.cs
- PrintController.cs
- Int32Converter.cs
- SqlRowUpdatingEvent.cs
- XPathEmptyIterator.cs
- MetabaseSettings.cs
- ToolStripLocationCancelEventArgs.cs
- CompilerParameters.cs
- CodeDirectionExpression.cs
- DbProviderConfigurationHandler.cs
- Misc.cs
- SystemNetHelpers.cs
- TableColumn.cs
- DiscoveryOperationContextExtension.cs
- ExpressionPrefixAttribute.cs
- HttpPostProtocolImporter.cs
- UIElementAutomationPeer.cs
- UseAttributeSetsAction.cs
- counter.cs
- DataGridViewHeaderCell.cs
- LicenseContext.cs
- XmlSchemaGroup.cs
- HwndHost.cs
- DocumentViewerBase.cs
- FixUp.cs
- BinaryCommonClasses.cs
- DeferredTextReference.cs
- MenuItemBinding.cs
- InfoCardRSAPKCS1KeyExchangeFormatter.cs
- ConversionHelper.cs
- Image.cs
- PerfCounterSection.cs
- XmlEventCache.cs
- ObjectPropertyMapping.cs
- Group.cs
- InstanceDataCollection.cs
- OneOfTypeConst.cs
- CornerRadius.cs
- PointConverter.cs
- DrawingState.cs
- SiteMapNodeCollection.cs
- RequestCacheManager.cs
- webproxy.cs
- IdentityManager.cs
- TitleStyle.cs
- DynamicMethod.cs
- CacheOutputQuery.cs
- FollowerQueueCreator.cs
- DependencyObjectCodeDomSerializer.cs
- AffineTransform3D.cs
- WSUtilitySpecificationVersion.cs
- WebZone.cs
- MediaElementAutomationPeer.cs
- CodeRemoveEventStatement.cs
- ForeignKeyConstraint.cs
- MaskedTextBoxDesigner.cs
- Encoder.cs
- ColumnCollection.cs
- XmlCharCheckingWriter.cs
- FontStretches.cs
- WrappingXamlSchemaContext.cs
- UInt16.cs
- ExponentialEase.cs
- MSHTMLHost.cs
- NodeInfo.cs
- StorageAssociationSetMapping.cs
- AssemblyCache.cs
- Triplet.cs
- WorkflowMarkupSerializer.cs
- ToolStripProgressBar.cs
- IPEndPoint.cs
- XmlAnyElementAttributes.cs
- BamlLocalizer.cs
- ContractSearchPattern.cs
- DataServiceResponse.cs
- AuthenticationException.cs
- HtmlInputImage.cs
- EntityCommandDefinition.cs
- MemoryMappedViewStream.cs
- SiteOfOriginContainer.cs
- CombinedGeometry.cs
- EmptyStringExpandableObjectConverter.cs
- DataObject.cs
- WindowsToolbar.cs
- WebPartZoneCollection.cs
- EFTableProvider.cs
- MatrixTransform.cs
- HtmlEmptyTagControlBuilder.cs
- TextRange.cs
- FixedPageStructure.cs
- XmlUrlResolver.cs