Code:
/ FXUpdate3074 / FXUpdate3074 / 1.1 / untmp / whidbey / QFE / ndp / fx / src / xsp / System / Web / UI / WebParts / ZoneLinkButton.cs / 2 / ZoneLinkButton.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.UI.WebControls.WebParts { using System; using System.ComponentModel; using System.Web.UI.WebControls; ////// [SupportsEventValidation] internal sealed class ZoneLinkButton : LinkButton { private WebZone _owner; private string _eventArgument; private string _imageUrl; public ZoneLinkButton(WebZone owner, string eventArgument) { if (owner == null) { throw new ArgumentNullException("owner"); } _owner = owner; _eventArgument = eventArgument; } public string ImageUrl { get { return (_imageUrl != null) ? _imageUrl : String.Empty; } set { _imageUrl = value; } } protected override PostBackOptions GetPostBackOptions() { // _owner.Page may be null in the designer if (!String.IsNullOrEmpty(_eventArgument) && _owner.Page != null) { PostBackOptions options = new PostBackOptions(_owner, _eventArgument); options.RequiresJavaScriptProtocol = true; return options; } return base.GetPostBackOptions(); } protected internal override void RenderContents(HtmlTextWriter writer) { // Copied from HyperLink.RenderContents() and modified slightly string imageUrl = ImageUrl; if (!String.IsNullOrEmpty(imageUrl)) { Image image = new Image(); // image.ImageUrl = ResolveClientUrl(imageUrl); string toolTip = ToolTip; if (!String.IsNullOrEmpty(toolTip)) { image.ToolTip = toolTip; } string text = Text; if (!String.IsNullOrEmpty(text)) { image.AlternateText = text; } image.Page = Page; image.RenderControl(writer); } else { base.RenderContents(writer); } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu
![Network programming in C#, Network Programming in VB.NET, Network Programming in .NET](/images/book.jpg)
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- MediaContext.cs
- TemplateDefinition.cs
- path.cs
- MobileCapabilities.cs
- ErrorHandler.cs
- EnumBuilder.cs
- DbCommandTree.cs
- SessionPageStatePersister.cs
- MatrixStack.cs
- Fonts.cs
- IImplicitResourceProvider.cs
- SizeAnimationUsingKeyFrames.cs
- CompareInfo.cs
- XmlSerializerFactory.cs
- ProjectionNode.cs
- EntityFunctions.cs
- WebPartDescription.cs
- RangeEnumerable.cs
- Graphics.cs
- ReadOnlyCollection.cs
- HybridDictionary.cs
- ValuePattern.cs
- ObjectListFieldCollection.cs
- CompilationPass2TaskInternal.cs
- SqlDataSourceRefreshSchemaForm.cs
- figurelengthconverter.cs
- PerformanceCountersElement.cs
- Zone.cs
- DataGridColumnCollection.cs
- UpnEndpointIdentity.cs
- Calendar.cs
- ReferenceAssemblyAttribute.cs
- PointAnimationClockResource.cs
- SafeNativeMethods.cs
- KeyFrames.cs
- ScrollItemProviderWrapper.cs
- AudioFormatConverter.cs
- ValueSerializer.cs
- ExtenderProviderService.cs
- OutKeywords.cs
- RenderData.cs
- MenuItemAutomationPeer.cs
- UnionExpr.cs
- CustomErrorsSection.cs
- FormatConvertedBitmap.cs
- ProvidersHelper.cs
- ListBox.cs
- Path.cs
- RectangleGeometry.cs
- X509RawDataKeyIdentifierClause.cs
- PartialList.cs
- HtmlMeta.cs
- SyndicationElementExtensionCollection.cs
- EventLogInformation.cs
- CommandBinding.cs
- TypeInitializationException.cs
- Slider.cs
- RelationshipType.cs
- MissingFieldException.cs
- HttpHandlersSection.cs
- TextProviderWrapper.cs
- ClientRolePrincipal.cs
- EUCJPEncoding.cs
- RemoteWebConfigurationHost.cs
- MessageDescriptionCollection.cs
- XamlPointCollectionSerializer.cs
- AdornerHitTestResult.cs
- HttpRequest.cs
- SuppressIldasmAttribute.cs
- ClientApiGenerator.cs
- InputManager.cs
- XmlAtomicValue.cs
- AnnotationComponentManager.cs
- InvokePatternIdentifiers.cs
- GridEntry.cs
- TwoPhaseCommitProxy.cs
- DataPagerFieldCollection.cs
- DragCompletedEventArgs.cs
- InvokePattern.cs
- WinEventHandler.cs
- PenThreadWorker.cs
- HttpPostedFileWrapper.cs
- CodeTypeOfExpression.cs
- TypeHelper.cs
- GridProviderWrapper.cs
- CallbackHandler.cs
- CustomAttribute.cs
- DataControlImageButton.cs
- XmlChoiceIdentifierAttribute.cs
- StandardToolWindows.cs
- LinkedResourceCollection.cs
- ManipulationDevice.cs
- Not.cs
- DetailsViewPageEventArgs.cs
- CounterCreationDataConverter.cs
- ConstructorNeedsTagAttribute.cs
- GridViewColumnHeader.cs
- ProxyDataContractResolver.cs
- _NetworkingPerfCounters.cs
- ElementAction.cs