Code:
/ DotNET / DotNET / 8.0 / untmp / Orcas / RTM / ndp / fx / src / xsp / System / Web / Extensions / ui / PostBackTrigger.cs / 2 / 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", "CA1706:ShortAcronymsShouldBeUppercase"), 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.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- OleDbParameterCollection.cs
- DataGridViewImageColumn.cs
- TrackBar.cs
- ConstraintCollection.cs
- FontFamily.cs
- CollectionViewGroupRoot.cs
- DocComment.cs
- KeyPullup.cs
- FreezableCollection.cs
- Trace.cs
- HierarchicalDataBoundControl.cs
- RequestSecurityToken.cs
- ContractNamespaceAttribute.cs
- EdmPropertyAttribute.cs
- PriorityRange.cs
- TransformValueSerializer.cs
- MsdtcWrapper.cs
- StringAnimationBase.cs
- TypeForwardedToAttribute.cs
- StoryFragments.cs
- ViewValidator.cs
- Int32Animation.cs
- SqlNotificationEventArgs.cs
- ArrayExtension.cs
- XmlSchema.cs
- ChoiceConverter.cs
- SafeSecurityHelper.cs
- FileController.cs
- MouseButton.cs
- XPathSelfQuery.cs
- ContentElement.cs
- ManipulationCompletedEventArgs.cs
- ReadWriteSpinLock.cs
- AgileSafeNativeMemoryHandle.cs
- BamlTreeNode.cs
- CodeAttributeDeclaration.cs
- RangeValidator.cs
- RtfControls.cs
- ImageListUtils.cs
- NonParentingControl.cs
- MissingMethodException.cs
- ListViewItemSelectionChangedEvent.cs
- RectangleConverter.cs
- TextServicesProperty.cs
- Contracts.cs
- AuthenticationModulesSection.cs
- DataObjectCopyingEventArgs.cs
- MsmqIntegrationAppDomainProtocolHandler.cs
- TextPattern.cs
- GridViewSortEventArgs.cs
- UrlEncodedParameterWriter.cs
- DropSourceBehavior.cs
- PermissionSetEnumerator.cs
- InputProcessorProfilesLoader.cs
- Lasso.cs
- PageCodeDomTreeGenerator.cs
- ConfigXmlWhitespace.cs
- CodeIterationStatement.cs
- BitmapSourceSafeMILHandle.cs
- RegexBoyerMoore.cs
- DataObjectPastingEventArgs.cs
- WindowsToolbar.cs
- FormViewModeEventArgs.cs
- TextEffect.cs
- Decoder.cs
- CodeIndexerExpression.cs
- AddingNewEventArgs.cs
- SelectionListComponentEditor.cs
- UriParserTemplates.cs
- ObjectTypeMapping.cs
- SqlDataSource.cs
- NavigationHelper.cs
- ActivityCodeDomReferenceService.cs
- MainMenu.cs
- Shape.cs
- CheckBoxRenderer.cs
- OracleCommandSet.cs
- HasCopySemanticsAttribute.cs
- ExtensionQuery.cs
- CodePrimitiveExpression.cs
- EmptyWorkItem.cs
- AccessDataSourceView.cs
- FastEncoder.cs
- StrokeNodeData.cs
- ScriptManager.cs
- CustomActivityDesigner.cs
- MediaTimeline.cs
- ArrangedElementCollection.cs
- OracleFactory.cs
- PersonalizationProvider.cs
- TimeEnumHelper.cs
- HandoffBehavior.cs
- ConstraintEnumerator.cs
- ObjectDataSourceStatusEventArgs.cs
- TreeNode.cs
- ReturnValue.cs
- KeyNotFoundException.cs
- Verify.cs
- ColumnHeaderConverter.cs
- TiffBitmapEncoder.cs