Code:
/ 4.0 / 4.0 / 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. //------------------------------------------------------------------------------ //// 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
- PathSegment.cs
- PreservationFileWriter.cs
- PointLightBase.cs
- CodeLabeledStatement.cs
- ControlSerializer.cs
- PolicyLevel.cs
- XdrBuilder.cs
- StrongTypingException.cs
- ScrollChrome.cs
- Menu.cs
- hresults.cs
- PerformanceCounterManager.cs
- Int32KeyFrameCollection.cs
- ValueChangedEventManager.cs
- CrossAppDomainChannel.cs
- Int64Converter.cs
- AutomationEventArgs.cs
- TimeSpanValidatorAttribute.cs
- GeneralTransform3DTo2D.cs
- DynamicValidatorEventArgs.cs
- COSERVERINFO.cs
- X509CertificateClaimSet.cs
- DelimitedListTraceListener.cs
- FieldToken.cs
- RefType.cs
- ADMembershipProvider.cs
- TcpSocketManager.cs
- OdbcDataAdapter.cs
- WindowsRichEditRange.cs
- FieldDescriptor.cs
- RenderTargetBitmap.cs
- CheckBoxField.cs
- Scene3D.cs
- ObjectConverter.cs
- BoundConstants.cs
- DuplicateWaitObjectException.cs
- HttpWebRequest.cs
- RightsManagementInformation.cs
- FlowDocument.cs
- DataSvcMapFileSerializer.cs
- MaskedTextProvider.cs
- SimpleWorkerRequest.cs
- AssemblyContextControlItem.cs
- WeakEventManager.cs
- HashCodeCombiner.cs
- CompiledRegexRunner.cs
- OciEnlistContext.cs
- WebPartConnectVerb.cs
- SoapHelper.cs
- ListViewContainer.cs
- PersonalizablePropertyEntry.cs
- SAPIEngineTypes.cs
- DataControlCommands.cs
- SqlCacheDependencySection.cs
- ApplyImportsAction.cs
- GradientStop.cs
- IOThreadScheduler.cs
- DataSourceControl.cs
- WebBrowser.cs
- Rfc4050KeyFormatter.cs
- ADConnectionHelper.cs
- TextEffectCollection.cs
- TreeView.cs
- documentsequencetextcontainer.cs
- MonitoringDescriptionAttribute.cs
- DataRelationPropertyDescriptor.cs
- _AutoWebProxyScriptWrapper.cs
- Int32RectValueSerializer.cs
- TypeSystem.cs
- unsafenativemethodsother.cs
- PhysicalFontFamily.cs
- TextRunCache.cs
- DataTableReaderListener.cs
- UnknownBitmapDecoder.cs
- PasswordDeriveBytes.cs
- EditorPartCollection.cs
- EventLogPermissionEntryCollection.cs
- DataGridViewButtonColumn.cs
- DataGridViewCellParsingEventArgs.cs
- DataGridViewRowPostPaintEventArgs.cs
- XmlRawWriter.cs
- DbLambda.cs
- KoreanCalendar.cs
- CodeGroup.cs
- XmlElement.cs
- RequestCachingSection.cs
- CounterSampleCalculator.cs
- StateMachineTimers.cs
- WorkerRequest.cs
- TableLayoutPanelResizeGlyph.cs
- DependentList.cs
- XmlDomTextWriter.cs
- Control.cs
- SqlDuplicator.cs
- DataGridColumnHeaderCollection.cs
- ReadOnlyDictionary.cs
- ManagedIStream.cs
- GeometryModel3D.cs
- XmlWriterSettings.cs
- XmlSchemaElement.cs