Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / ndp / fx / src / xsp / System / Web / UI / WebControls / DataControlPagerLinkButton.cs / 1 / 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; } } } } } }
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- CollectionChangedEventManager.cs
- TypeSemantics.cs
- DocumentOrderQuery.cs
- DateTimeFormatInfo.cs
- HyperLinkField.cs
- DrawListViewItemEventArgs.cs
- RemotingServices.cs
- TdsParserStaticMethods.cs
- ContainerSelectorGlyph.cs
- TypeConverterAttribute.cs
- BinHexEncoder.cs
- SliderAutomationPeer.cs
- FutureFactory.cs
- ErrorStyle.cs
- FixedFindEngine.cs
- PartialTrustVisibleAssembliesSection.cs
- MetaModel.cs
- TextServicesLoader.cs
- MatrixKeyFrameCollection.cs
- PhonemeEventArgs.cs
- CompoundFileDeflateTransform.cs
- SelectionChangedEventArgs.cs
- MetadataArtifactLoaderXmlReaderWrapper.cs
- ExceptionRoutedEventArgs.cs
- InputLanguageSource.cs
- DataTableReader.cs
- RegexParser.cs
- SqlTrackingWorkflowInstance.cs
- SymbolType.cs
- ResponseBodyWriter.cs
- AmbientLight.cs
- dataprotectionpermission.cs
- IDispatchConstantAttribute.cs
- XmlNamespaceDeclarationsAttribute.cs
- IUnknownConstantAttribute.cs
- SiteMapNodeItem.cs
- XmlNamespaceDeclarationsAttribute.cs
- CodeSnippetCompileUnit.cs
- AssociationSet.cs
- XmlAnyElementAttributes.cs
- AssemblyHash.cs
- DelegateHelpers.cs
- TransactionManager.cs
- BoundingRectTracker.cs
- RegistrationServices.cs
- DBCSCodePageEncoding.cs
- SingleTagSectionHandler.cs
- EUCJPEncoding.cs
- FrugalList.cs
- UnsafeNetInfoNativeMethods.cs
- Storyboard.cs
- jithelpers.cs
- TableLayoutPanelResizeGlyph.cs
- FieldBuilder.cs
- DataStreamFromComStream.cs
- ThreadExceptionDialog.cs
- TreeNodeBindingDepthConverter.cs
- Expression.cs
- QilLiteral.cs
- EventBuilder.cs
- Compiler.cs
- ConfigXmlText.cs
- InputProcessorProfilesLoader.cs
- VectorAnimationBase.cs
- Image.cs
- ADConnectionHelper.cs
- PerformanceCounterCategory.cs
- EntityDataSourceChangedEventArgs.cs
- PrivateFontCollection.cs
- BoundsDrawingContextWalker.cs
- TextRunCacheImp.cs
- IndexedSelectQueryOperator.cs
- DependencyObjectValidator.cs
- ProxyElement.cs
- WebPartEditVerb.cs
- ClickablePoint.cs
- ConnectionsZone.cs
- DesignDataSource.cs
- XmlSchemaAny.cs
- SqlStatistics.cs
- FontFamilyValueSerializer.cs
- NullableLongSumAggregationOperator.cs
- FontSizeConverter.cs
- EdmMember.cs
- UnsafeNativeMethods.cs
- MailHeaderInfo.cs
- LiteralDesigner.cs
- UriTemplateDispatchFormatter.cs
- SettingsAttributeDictionary.cs
- WorkflowIdleElement.cs
- SystemIPv4InterfaceProperties.cs
- DataRow.cs
- ClientScriptManagerWrapper.cs
- DotNetATv1WindowsLogEntryDeserializer.cs
- AutomationElementIdentifiers.cs
- ActivityMarkupSerializer.cs
- MediaSystem.cs
- glyphs.cs
- CodeArrayCreateExpression.cs
- ReferenceConverter.cs