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
- PagedDataSource.cs
- ObjectViewListener.cs
- GridEntryCollection.cs
- OletxVolatileEnlistment.cs
- MethodCallConverter.cs
- SamlSubjectStatement.cs
- ListViewDeleteEventArgs.cs
- ChooseAction.cs
- NavigationWindowAutomationPeer.cs
- CalculatedColumn.cs
- VariableQuery.cs
- MissingManifestResourceException.cs
- QilStrConcat.cs
- DocumentPageView.cs
- SessionKeyExpiredException.cs
- DataAdapter.cs
- TypeSemantics.cs
- Typography.cs
- XamlReaderHelper.cs
- Monitor.cs
- AlignmentYValidation.cs
- VariantWrapper.cs
- LogFlushAsyncResult.cs
- ComboBox.cs
- MatrixTransform.cs
- SecurityHelper.cs
- WaitForChangedResult.cs
- JsonDeserializer.cs
- Translator.cs
- _NativeSSPI.cs
- XAMLParseException.cs
- WeakEventTable.cs
- Ops.cs
- XmlHierarchyData.cs
- TextBlockAutomationPeer.cs
- ListViewItem.cs
- GenericPrincipal.cs
- PaginationProgressEventArgs.cs
- GridViewColumnHeader.cs
- DataFormats.cs
- BitmapFrame.cs
- XamlHostingConfiguration.cs
- validationstate.cs
- StylusEventArgs.cs
- XsltFunctions.cs
- CompositeDataBoundControl.cs
- NamespaceEmitter.cs
- BuildProvider.cs
- EtwTrackingParticipant.cs
- UseLicense.cs
- CFGGrammar.cs
- WebPartVerb.cs
- JsonCollectionDataContract.cs
- TextShapeableCharacters.cs
- EncryptedReference.cs
- DataGridViewCellValidatingEventArgs.cs
- DoubleLinkList.cs
- CompModSwitches.cs
- UnsafeCollabNativeMethods.cs
- basemetadatamappingvisitor.cs
- columnmapkeybuilder.cs
- PropertyAccessVisitor.cs
- StringSource.cs
- PropertyValueUIItem.cs
- RenderData.cs
- CryptoApi.cs
- SystemIPGlobalProperties.cs
- MetaChildrenColumn.cs
- FontUnitConverter.cs
- COM2IDispatchConverter.cs
- ProgressBar.cs
- XPathParser.cs
- SqlDataRecord.cs
- DrawingContextWalker.cs
- UdpRetransmissionSettings.cs
- WebPartPersonalization.cs
- LinkUtilities.cs
- Vector3DCollectionValueSerializer.cs
- AuthenticationSection.cs
- WebPartConnectionsConnectVerb.cs
- DetailsViewRowCollection.cs
- ValueQuery.cs
- SourceFilter.cs
- DataControlButton.cs
- FileSystemWatcher.cs
- ContainerParagraph.cs
- DnsPermission.cs
- PageThemeBuildProvider.cs
- SubMenuStyle.cs
- panel.cs
- ListViewItem.cs
- ActivityTypeCodeDomSerializer.cs
- InternalConfigConfigurationFactory.cs
- BooleanExpr.cs
- RecordConverter.cs
- TypeListConverter.cs
- RootContext.cs
- columnmapfactory.cs
- SizeAnimationClockResource.cs
- RC2CryptoServiceProvider.cs