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
- ObjectStateEntryOriginalDbUpdatableDataRecord.cs
- Serializer.cs
- OleDbInfoMessageEvent.cs
- SourceElementsCollection.cs
- CompressionTransform.cs
- TreeNodeBindingCollection.cs
- DataGridViewButtonCell.cs
- StatusBarPanel.cs
- ValidationUtility.cs
- Effect.cs
- Maps.cs
- InheritanceUI.cs
- XPathMessageFilterTable.cs
- ToolStripProfessionalLowResolutionRenderer.cs
- DataListItemCollection.cs
- StubHelpers.cs
- RequestCachingSection.cs
- DispatchWrapper.cs
- GeometryCombineModeValidation.cs
- OpenFileDialog.cs
- BinaryFormatterWriter.cs
- ConfigXmlComment.cs
- PersonalizationStateQuery.cs
- ToolStripArrowRenderEventArgs.cs
- OdbcCommandBuilder.cs
- SessionSwitchEventArgs.cs
- PageSetupDialog.cs
- RowToFieldTransformer.cs
- ToolStrip.cs
- CompilerWrapper.cs
- HttpConfigurationSystem.cs
- TextRunCacheImp.cs
- TdsParserSessionPool.cs
- HtmlElementEventArgs.cs
- PageWrapper.cs
- ListBoxItemAutomationPeer.cs
- ComponentDispatcher.cs
- HttpHandlerAction.cs
- PeerCredentialElement.cs
- DataGridViewCellStyleBuilderDialog.cs
- HtmlInputControl.cs
- OperandQuery.cs
- ListViewDataItem.cs
- MergablePropertyAttribute.cs
- TreeNodeCollectionEditor.cs
- ModelTreeEnumerator.cs
- ComboBox.cs
- complextypematerializer.cs
- PropertyRecord.cs
- SizeValueSerializer.cs
- TypeElement.cs
- Automation.cs
- BatchParser.cs
- TextServicesHost.cs
- BoolLiteral.cs
- HandleCollector.cs
- ItemCollection.cs
- MethodInfo.cs
- ValidatorCompatibilityHelper.cs
- CodeDelegateInvokeExpression.cs
- PageAsyncTask.cs
- HtmlElementErrorEventArgs.cs
- WeakReference.cs
- AspNetHostingPermission.cs
- CompilationRelaxations.cs
- Wow64ConfigurationLoader.cs
- SqlRetyper.cs
- AsyncStreamReader.cs
- CommandManager.cs
- HwndKeyboardInputProvider.cs
- CreateUserWizardDesigner.cs
- IWorkflowDebuggerService.cs
- CaretElement.cs
- SafeEventHandle.cs
- GlyphInfoList.cs
- UniqueConstraint.cs
- xml.cs
- PlanCompiler.cs
- ResourceReader.cs
- MinimizableAttributeTypeConverter.cs
- RawStylusInputReport.cs
- VerificationException.cs
- TraceInternal.cs
- RichListBox.cs
- GroupBoxRenderer.cs
- ServiceManager.cs
- InkCanvasSelection.cs
- XmlDocumentFragment.cs
- TimersDescriptionAttribute.cs
- TraversalRequest.cs
- ToolBarOverflowPanel.cs
- ContainerSelectorBehavior.cs
- ProfileEventArgs.cs
- ToolboxItem.cs
- IDataContractSurrogate.cs
- CodeTypeMember.cs
- TextBounds.cs
- DatePickerDateValidationErrorEventArgs.cs
- TypeUnloadedException.cs
- Int32.cs