Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / xsp / System / Web / UI / WebControls / DataControlPagerLinkButton.cs / 1305376 / DataControlPagerLinkButton.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.UI.WebControls { using System; using System.Drawing; using System.Web.Util; ////// Derived version of LinkButton used within a DataControl. /// [SupportsEventValidation] internal class DataControlPagerLinkButton : DataControlLinkButton { internal DataControlPagerLinkButton(IPostBackContainer container) : base(container) { } public override bool CausesValidation { get { return false; } set { throw new NotSupportedException(SR.GetString(SR.CannotSetValidationOnPagerButtons)); } } ////// In HTML hyperlinks always use the browser's link color. /// For the DataControl, we want all LinkButtons to honor the ForeColor setting. /// This requires looking up into the control hierarchy to see if either the cell /// or the containing row or table define a ForeColor. /// protected override void SetForeColor() { if (ControlStyle.IsSet(System.Web.UI.WebControls.Style.PROP_FORECOLOR) == false) { Color hyperLinkForeColor; Control control = this; for (int i = 0; i < 6; i++) { control = control.Parent; // pager buttons are usually inside a table that's inside the pager row Debug.Assert(((i == 0) && (control is TableCell)) || ((i == 1) && (control is TableRow)) || ((i == 2) && (control is Table)) || ((i == 3) && (control is TableCell)) || ((i == 4) && (control is TableRow)) || ((i == 5) && (control is Table))); hyperLinkForeColor = ((WebControl)control).ForeColor; if (hyperLinkForeColor != Color.Empty) { ForeColor = hyperLinkForeColor; break; } } } } } } // 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
- ClientSession.cs
- WSDualHttpSecurityMode.cs
- XmlDocumentFragment.cs
- Attributes.cs
- InvokePattern.cs
- TableLayoutPanel.cs
- AsyncCompletedEventArgs.cs
- HandleExceptionArgs.cs
- QilReference.cs
- AttachedPropertyMethodSelector.cs
- XmlEncoding.cs
- AmbientValueAttribute.cs
- MediaSystem.cs
- TreeViewImageKeyConverter.cs
- ImageInfo.cs
- FileEnumerator.cs
- AssemblyInfo.cs
- CachedPathData.cs
- RuntimeConfig.cs
- FileDialog.cs
- DataExpression.cs
- SqlBulkCopyColumnMapping.cs
- DynamicContractTypeBuilder.cs
- AssertFilter.cs
- DataGridParentRows.cs
- ByteFacetDescriptionElement.cs
- NetworkInformationPermission.cs
- CollectionExtensions.cs
- NeedSkipTokenVisitor.cs
- Rect.cs
- ByteArrayHelperWithString.cs
- ValidationSummary.cs
- _Semaphore.cs
- ObjectPersistData.cs
- FixedFlowMap.cs
- localization.cs
- StickyNoteContentControl.cs
- CodeValidator.cs
- CodeTryCatchFinallyStatement.cs
- GlobalItem.cs
- WindowsProgressbar.cs
- XmlDataLoader.cs
- ControlLocalizer.cs
- HttpServerVarsCollection.cs
- SQLResource.cs
- ActiveXSite.cs
- SecUtil.cs
- DateTimeValueSerializerContext.cs
- GraphicsContext.cs
- DependencyPropertyChangedEventArgs.cs
- TreeNodeConverter.cs
- ChangeProcessor.cs
- HttpResponseHeader.cs
- XamlRtfConverter.cs
- BuildProviderAppliesToAttribute.cs
- TextEditor.cs
- ObjectSet.cs
- Properties.cs
- SecureUICommand.cs
- NullableBoolConverter.cs
- TreeChangeInfo.cs
- FileStream.cs
- OpenFileDialog.cs
- SQLMoneyStorage.cs
- _IPv6Address.cs
- DataGridViewRowHeaderCell.cs
- VectorCollection.cs
- SafeNativeMethodsMilCoreApi.cs
- TrackingProfileDeserializationException.cs
- AdapterSwitches.cs
- EntityDataSourceReferenceGroup.cs
- ISAPIRuntime.cs
- OdbcException.cs
- EventItfInfo.cs
- ConfigWriter.cs
- XmlSchemaInclude.cs
- BaseProcessor.cs
- TaiwanCalendar.cs
- BitmapSource.cs
- SortedDictionary.cs
- UpDownEvent.cs
- NameValueCollection.cs
- KoreanCalendar.cs
- RangeValidator.cs
- VirtualizingStackPanel.cs
- PeerNameRecordCollection.cs
- QuerySafeNavigator.cs
- BehaviorDragDropEventArgs.cs
- SQLBinary.cs
- CommandHelpers.cs
- EnumerableRowCollectionExtensions.cs
- BitStream.cs
- AudioBase.cs
- embossbitmapeffect.cs
- FrugalList.cs
- ListChangedEventArgs.cs
- DataDocumentXPathNavigator.cs
- HostingEnvironment.cs
- BitStack.cs
- Types.cs