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
- ComponentEvent.cs
- TraceContextEventArgs.cs
- elementinformation.cs
- ContextCorrelationInitializer.cs
- Privilege.cs
- ClickablePoint.cs
- XmlHierarchicalDataSourceView.cs
- EventProviderBase.cs
- OleDbPropertySetGuid.cs
- AccessibleObject.cs
- AutoScrollExpandMessageFilter.cs
- SqlServices.cs
- DbgCompiler.cs
- ParseHttpDate.cs
- SymbolDocumentGenerator.cs
- TerminatorSinks.cs
- RegexGroupCollection.cs
- Rules.cs
- SecurityDocument.cs
- JapaneseLunisolarCalendar.cs
- HandlerWithFactory.cs
- CodeBlockBuilder.cs
- PropertyToken.cs
- TreeNode.cs
- InputBinding.cs
- SignatureToken.cs
- XPathEmptyIterator.cs
- XmlDataLoader.cs
- InkPresenterAutomationPeer.cs
- TrackingWorkflowEventArgs.cs
- OrderByBuilder.cs
- LinkArea.cs
- Input.cs
- MenuStrip.cs
- InfoCardRSAOAEPKeyExchangeDeformatter.cs
- FormatterConverter.cs
- XamlStream.cs
- MemberAccessException.cs
- DbConnectionInternal.cs
- Enumerable.cs
- SqlFileStream.cs
- MessageFilterException.cs
- ImpersonateTokenRef.cs
- SchemaElementLookUpTableEnumerator.cs
- Application.cs
- WebPartCancelEventArgs.cs
- MarginCollapsingState.cs
- OrderablePartitioner.cs
- StreamAsIStream.cs
- DisplayClaim.cs
- IIS7WorkerRequest.cs
- ObjectAnimationUsingKeyFrames.cs
- TypeDescriptor.cs
- DocumentPageTextView.cs
- PrtTicket_Base.cs
- ApplicationManager.cs
- CharUnicodeInfo.cs
- RawStylusInputReport.cs
- EventListener.cs
- MetadataSerializer.cs
- ConditionalWeakTable.cs
- ParallelTimeline.cs
- DataControlImageButton.cs
- CursorConverter.cs
- ParallelEnumerableWrapper.cs
- Expression.DebuggerProxy.cs
- ParentQuery.cs
- Paragraph.cs
- FolderBrowserDialog.cs
- FontNameEditor.cs
- AgileSafeNativeMemoryHandle.cs
- ToolStripGrip.cs
- Point3DAnimation.cs
- TreeWalkHelper.cs
- HttpListenerResponse.cs
- Attachment.cs
- ListView.cs
- Visual3D.cs
- MultipleViewPatternIdentifiers.cs
- Directory.cs
- ReadWriteObjectLock.cs
- UnaryQueryOperator.cs
- RowTypeElement.cs
- TreeNodeSelectionProcessor.cs
- Thumb.cs
- ApplicationCommands.cs
- SslStream.cs
- TraceProvider.cs
- AssemblyBuilder.cs
- LocalFileSettingsProvider.cs
- CompressEmulationStream.cs
- CryptoHelper.cs
- TextDecorationLocationValidation.cs
- PropertyTab.cs
- PolicyAssertionCollection.cs
- ListParagraph.cs
- FormViewInsertedEventArgs.cs
- mediapermission.cs
- AutoCompleteStringCollection.cs
- WaitForChangedResult.cs