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
- EDesignUtil.cs
- HttpCookiesSection.cs
- HttpCachePolicyElement.cs
- DefaultWorkflowLoaderService.cs
- Binding.cs
- CatalogPart.cs
- RequestTimeoutManager.cs
- DesignerAdapterUtil.cs
- BrowserTree.cs
- GridViewItemAutomationPeer.cs
- AppDomainAttributes.cs
- ValidatorCollection.cs
- DataGridViewRowErrorTextNeededEventArgs.cs
- TargetControlTypeAttribute.cs
- ExpressionPrefixAttribute.cs
- GenericParameterDataContract.cs
- DynamicDataExtensions.cs
- NonSerializedAttribute.cs
- GridErrorDlg.cs
- WebPartHeaderCloseVerb.cs
- TextSpanModifier.cs
- DataGridViewCellParsingEventArgs.cs
- MimeFormatter.cs
- DomainConstraint.cs
- SendMailErrorEventArgs.cs
- TextFormattingConverter.cs
- ListCollectionView.cs
- BatchParser.cs
- DecimalAnimation.cs
- StyleModeStack.cs
- StateFinalizationActivity.cs
- CodeGroup.cs
- HwndStylusInputProvider.cs
- DesignerSerializationOptionsAttribute.cs
- DocumentEventArgs.cs
- TreeView.cs
- SiteMapNode.cs
- HintTextConverter.cs
- CheckBox.cs
- PolyBezierSegment.cs
- StructuredType.cs
- SchemaMapping.cs
- DataGrid.cs
- TrackingStringDictionary.cs
- List.cs
- _ConnectOverlappedAsyncResult.cs
- BindableTemplateBuilder.cs
- ILGen.cs
- EndOfStreamException.cs
- XmlConvert.cs
- HTMLTextWriter.cs
- XamlWrapperReaders.cs
- AuthenticationConfig.cs
- PropertyChangeTracker.cs
- DataRowChangeEvent.cs
- ToolTip.cs
- CultureTableRecord.cs
- SqlConnectionFactory.cs
- PreservationFileReader.cs
- OdbcConnection.cs
- GeometryCollection.cs
- JoinElimination.cs
- __Error.cs
- HttpSocketManager.cs
- TextBox.cs
- ComponentDesigner.cs
- PopOutPanel.cs
- FormsAuthenticationModule.cs
- HttpCookie.cs
- ProfileSettingsCollection.cs
- TextBreakpoint.cs
- SqlResolver.cs
- EventProviderClassic.cs
- ManualResetEvent.cs
- MemberAssignmentAnalysis.cs
- VariableQuery.cs
- LicenseException.cs
- EntitySqlQueryCacheEntry.cs
- MD5.cs
- EdmPropertyAttribute.cs
- DefaultTraceListener.cs
- DesignerTextBoxAdapter.cs
- SafeHandle.cs
- XmlSchemaObject.cs
- TextDecorations.cs
- activationcontext.cs
- SafeUserTokenHandle.cs
- OleDbParameterCollection.cs
- MessageQueueInstaller.cs
- processwaithandle.cs
- ContentPresenter.cs
- FamilyTypefaceCollection.cs
- XmlSchemaGroup.cs
- Gdiplus.cs
- SrgsSemanticInterpretationTag.cs
- FormViewDeleteEventArgs.cs
- CapacityStreamGeometryContext.cs
- GridViewRowCollection.cs
- PropertyNames.cs
- WebPartDescription.cs