Code:
/ DotNET / DotNET / 8.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
- FilePrompt.cs
- XmlIgnoreAttribute.cs
- RoleGroup.cs
- ChannelServices.cs
- RenderDataDrawingContext.cs
- Graphics.cs
- DeviceContext2.cs
- WorkflowApplicationCompletedEventArgs.cs
- RequestCachePolicyConverter.cs
- AmbientValueAttribute.cs
- XmlUtil.cs
- OutputScope.cs
- PrintControllerWithStatusDialog.cs
- HexParser.cs
- DbConnectionPoolGroup.cs
- DurableInstanceManager.cs
- SerializationAttributes.cs
- SynchronousChannelMergeEnumerator.cs
- ForeignConstraint.cs
- MarginsConverter.cs
- TextEncodedRawTextWriter.cs
- ColorConvertedBitmap.cs
- DesignerActionPanel.cs
- Rfc4050KeyFormatter.cs
- ElapsedEventArgs.cs
- SignatureToken.cs
- ColorConvertedBitmap.cs
- GuidelineCollection.cs
- DateBoldEvent.cs
- WebPartCatalogCloseVerb.cs
- FloaterBaseParaClient.cs
- ListenerElementsCollection.cs
- OdbcConnection.cs
- SiteMapPathDesigner.cs
- ThicknessAnimationBase.cs
- PEFileEvidenceFactory.cs
- EnumUnknown.cs
- GlobalizationAssembly.cs
- SchemaImporter.cs
- DataRow.cs
- ContentWrapperAttribute.cs
- DebugTraceHelper.cs
- ScrollEvent.cs
- EncoderFallback.cs
- DiscoveryDocumentLinksPattern.cs
- ExpressionPrefixAttribute.cs
- GreenMethods.cs
- LazyTextWriterCreator.cs
- InputElement.cs
- DataTableCollection.cs
- SrgsElementList.cs
- DrawingImage.cs
- ObservableDictionary.cs
- EventLogger.cs
- DependencyObject.cs
- MsmqBindingBase.cs
- WSSecurityPolicy12.cs
- SqlCacheDependencyDatabase.cs
- StrongNameSignatureInformation.cs
- PeerName.cs
- OdbcEnvironment.cs
- ListItemsCollectionEditor.cs
- TypeBuilder.cs
- XsdSchemaFileEditor.cs
- IIS7ConfigurationLoader.cs
- UnconditionalPolicy.cs
- ParenthesizePropertyNameAttribute.cs
- OleDbParameter.cs
- GenericTypeParameterConverter.cs
- Compress.cs
- UserNamePasswordServiceCredential.cs
- BindingWorker.cs
- MenuItemStyleCollection.cs
- BridgeDataRecord.cs
- SelectionGlyph.cs
- CompressedStack.cs
- DataObjectPastingEventArgs.cs
- ValidationError.cs
- UriScheme.cs
- StrokeNodeOperations.cs
- InvalidateEvent.cs
- RequestQueue.cs
- SecondaryIndexList.cs
- ReliableSessionBindingElement.cs
- DataGridTableCollection.cs
- XamlRtfConverter.cs
- CodeValidator.cs
- WpfSharedXamlSchemaContext.cs
- CategoryAttribute.cs
- NotifyInputEventArgs.cs
- ForEachDesigner.xaml.cs
- ApplicationBuildProvider.cs
- FrameworkElement.cs
- SmtpSection.cs
- DrawingBrush.cs
- EventMappingSettings.cs
- _SSPIWrapper.cs
- SimpleRecyclingCache.cs
- TileBrush.cs
- x509store.cs