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
- SemanticKeyElement.cs
- InvokeMethodActivity.cs
- log.cs
- dataprotectionpermission.cs
- BooleanKeyFrameCollection.cs
- TransformProviderWrapper.cs
- Stroke2.cs
- MetadataItemSerializer.cs
- FunctionImportElement.cs
- LiteralControl.cs
- DeviceOverridableAttribute.cs
- Base64Stream.cs
- AdvancedBindingPropertyDescriptor.cs
- ActionMessageFilter.cs
- DeleteIndexBinder.cs
- DomainUpDown.cs
- UserUseLicenseDictionaryLoader.cs
- DataServiceRequestOfT.cs
- CompatibleComparer.cs
- ScriptHandlerFactory.cs
- ScrollableControl.cs
- ColumnClickEvent.cs
- CustomTypeDescriptor.cs
- DataBoundControlHelper.cs
- InsufficientMemoryException.cs
- LinearGradientBrush.cs
- SpellerStatusTable.cs
- ProcessThreadCollection.cs
- IImplicitResourceProvider.cs
- PerfCounters.cs
- URI.cs
- KeyMatchBuilder.cs
- RowVisual.cs
- DefaultConfirmation.cs
- MasterPage.cs
- UIElement3D.cs
- DeferredTextReference.cs
- GeometryCollection.cs
- PieceDirectory.cs
- complextypematerializer.cs
- ServiceModelActivationSectionGroup.cs
- CqlLexer.cs
- XmlIncludeAttribute.cs
- DiscoveryRequestHandler.cs
- HttpResponseInternalWrapper.cs
- XmlNodeList.cs
- HMACRIPEMD160.cs
- MdImport.cs
- LayoutTable.cs
- RSAPKCS1KeyExchangeDeformatter.cs
- SoapHeaderAttribute.cs
- CodeNamespace.cs
- SoapReflectionImporter.cs
- AnimationTimeline.cs
- CompoundFileReference.cs
- CodeCommentStatementCollection.cs
- Timer.cs
- QueryOutputWriter.cs
- ToolStripDropDownButton.cs
- CheckBoxRenderer.cs
- SplitContainer.cs
- EntityParameterCollection.cs
- MultipleViewPattern.cs
- ObjectSecurityT.cs
- DiagnosticTraceSource.cs
- WindowsGraphics2.cs
- BaseAppDomainProtocolHandler.cs
- WorkflowInstanceUnhandledExceptionRecord.cs
- DocumentViewer.cs
- CompilerWrapper.cs
- GridLengthConverter.cs
- WebPartZoneDesigner.cs
- PositiveTimeSpanValidator.cs
- OleDbRowUpdatedEvent.cs
- TextEncodedRawTextWriter.cs
- ListView.cs
- EditorPart.cs
- ListBase.cs
- MessageEncodingBindingElementImporter.cs
- GenericAuthenticationEventArgs.cs
- WindowsRebar.cs
- ListViewPagedDataSource.cs
- ColumnMapVisitor.cs
- ObsoleteAttribute.cs
- SqlLiftIndependentRowExpressions.cs
- TagMapInfo.cs
- SecurityKeyUsage.cs
- ListViewSortEventArgs.cs
- IsolatedStorage.cs
- HostProtectionPermission.cs
- InvokeMethod.cs
- NativeMethods.cs
- LoginView.cs
- Bitmap.cs
- Cursor.cs
- BitStream.cs
- QilStrConcat.cs
- BindUriHelper.cs
- EventSchemaTraceListener.cs
- ProcessInputEventArgs.cs