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
- QilPatternVisitor.cs
- ClientSettingsStore.cs
- SessionPageStateSection.cs
- ClientRuntimeConfig.cs
- LoginNameDesigner.cs
- DBPropSet.cs
- CompiledXpathExpr.cs
- SystemWebCachingSectionGroup.cs
- PropertyOrder.cs
- AspProxy.cs
- SponsorHelper.cs
- SocketPermission.cs
- AnnotationComponentManager.cs
- BmpBitmapEncoder.cs
- Decimal.cs
- CheckBoxPopupAdapter.cs
- BrowserCapabilitiesFactory.cs
- GridViewUpdateEventArgs.cs
- CatalogPart.cs
- SchemaNames.cs
- ResourceProviderFactory.cs
- FastEncoderWindow.cs
- XmlTextReaderImplHelpers.cs
- UserUseLicenseDictionaryLoader.cs
- SoapAttributeAttribute.cs
- MailMessageEventArgs.cs
- HostSecurityManager.cs
- SecureUICommand.cs
- SizeConverter.cs
- ProcessHostFactoryHelper.cs
- WebRequestModulesSection.cs
- ConstraintStruct.cs
- CustomAttributeSerializer.cs
- RSACryptoServiceProvider.cs
- XamlStackWriter.cs
- OracleTransaction.cs
- DataObjectMethodAttribute.cs
- TypeBuilderInstantiation.cs
- HostedBindingBehavior.cs
- CalendarDataBindingHandler.cs
- SparseMemoryStream.cs
- StylusShape.cs
- DataFieldConverter.cs
- ReturnEventArgs.cs
- SystemResourceHost.cs
- SerializationFieldInfo.cs
- ObjectDesignerDataSourceView.cs
- XmlILStorageConverter.cs
- FocusChangedEventArgs.cs
- StringWriter.cs
- GeneralTransform3DGroup.cs
- InternalConfigEventArgs.cs
- CodeVariableDeclarationStatement.cs
- StringExpressionSet.cs
- MgmtConfigurationRecord.cs
- HScrollProperties.cs
- MatrixCamera.cs
- DefaultParameterValueAttribute.cs
- BamlLocalizationDictionary.cs
- InternalBufferOverflowException.cs
- IPeerNeighbor.cs
- EmptyQuery.cs
- ScopeCompiler.cs
- ContractMethodInfo.cs
- HttpHandler.cs
- SchemaNamespaceManager.cs
- PackWebRequest.cs
- TableParaClient.cs
- XpsDocumentEvent.cs
- DateTimeValueSerializer.cs
- Stylus.cs
- CapiHashAlgorithm.cs
- BuildDependencySet.cs
- GeneralTransform2DTo3DTo2D.cs
- DispatcherEventArgs.cs
- ManagedWndProcTracker.cs
- MenuItemAutomationPeer.cs
- RulePatternOps.cs
- SiteMapNode.cs
- HMAC.cs
- FormViewPageEventArgs.cs
- DesignerActionKeyboardBehavior.cs
- TextEmbeddedObject.cs
- Oci.cs
- HuffModule.cs
- InputBinder.cs
- PageParserFilter.cs
- SQLMoneyStorage.cs
- Transform.cs
- XmlSchemaAttributeGroup.cs
- FixedSOMTableRow.cs
- TabControlCancelEvent.cs
- Error.cs
- SequenceDesigner.xaml.cs
- EdmMember.cs
- OutputScopeManager.cs
- WindowsEditBox.cs
- Int16AnimationUsingKeyFrames.cs
- PersistChildrenAttribute.cs
- returneventsaver.cs