Code:
/ 4.0 / 4.0 / untmp / 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.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- EncoderReplacementFallback.cs
- AttachmentCollection.cs
- FileUpload.cs
- PointF.cs
- DefaultEventAttribute.cs
- XmlDataImplementation.cs
- DependentList.cs
- FloatUtil.cs
- LayoutInformation.cs
- XmlBinaryReader.cs
- SecurityTokenTypes.cs
- TickBar.cs
- MultiTrigger.cs
- ColorTransformHelper.cs
- TaskResultSetter.cs
- HttpProtocolImporter.cs
- XsltLoader.cs
- UserControlDesigner.cs
- SemanticAnalyzer.cs
- ArgIterator.cs
- CultureSpecificStringDictionary.cs
- SerializableAttribute.cs
- CanExecuteRoutedEventArgs.cs
- MaskDesignerDialog.cs
- RegionData.cs
- PostBackOptions.cs
- ListDictionaryInternal.cs
- WhereQueryOperator.cs
- XPathSelfQuery.cs
- CharacterString.cs
- HashMembershipCondition.cs
- XmlIlVisitor.cs
- ConsumerConnectionPoint.cs
- IDQuery.cs
- AutomationElementCollection.cs
- ColorConverter.cs
- RunInstallerAttribute.cs
- ArgumentsParser.cs
- DetailsViewRow.cs
- DataListCommandEventArgs.cs
- SymbolEqualComparer.cs
- WorkflowServiceBehavior.cs
- FontDifferentiator.cs
- HuffModule.cs
- invalidudtexception.cs
- PrtCap_Public_Simple.cs
- XmlWriterSettings.cs
- StringArrayConverter.cs
- RepeatButton.cs
- XmlNodeReader.cs
- QilCloneVisitor.cs
- ServiceContractViewControl.cs
- ProtocolElementCollection.cs
- ApplicationFileParser.cs
- ToolStripStatusLabel.cs
- SelectionProcessor.cs
- ChannelCacheDefaults.cs
- SetIterators.cs
- METAHEADER.cs
- XNodeSchemaApplier.cs
- Assembly.cs
- ResourceCategoryAttribute.cs
- DirectoryNotFoundException.cs
- TdsParserStaticMethods.cs
- WebPartDisplayModeEventArgs.cs
- SplineQuaternionKeyFrame.cs
- TextServicesCompartmentContext.cs
- CatalogPartCollection.cs
- SHA384Managed.cs
- SmtpNetworkElement.cs
- Scene3D.cs
- Attributes.cs
- CodeCatchClause.cs
- HybridObjectCache.cs
- recordstate.cs
- StateChangeEvent.cs
- DiscoveryExceptionDictionary.cs
- DodSequenceMerge.cs
- OdbcError.cs
- Accessible.cs
- TranslateTransform.cs
- MdImport.cs
- SqlXmlStorage.cs
- DbgUtil.cs
- StrongNameHelpers.cs
- WriteTimeStream.cs
- RequiredFieldValidator.cs
- Pointer.cs
- IERequestCache.cs
- DesignTimeTemplateParser.cs
- Attributes.cs
- SortedList.cs
- DomNameTable.cs
- XmlQueryOutput.cs
- SingleStorage.cs
- TraceShell.cs
- TrustLevelCollection.cs
- DictationGrammar.cs
- RequestSecurityTokenResponse.cs
- XmlLoader.cs