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
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- Rotation3DAnimation.cs
- BamlLocalizer.cs
- SignerInfo.cs
- MultilineStringConverter.cs
- sortedlist.cs
- WindowProviderWrapper.cs
- Ppl.cs
- AuthenticationServiceManager.cs
- ConnectionAcceptor.cs
- BaseCodeDomTreeGenerator.cs
- GridViewDeletedEventArgs.cs
- ContextDataSource.cs
- KnownBoxes.cs
- XmlSchemaInclude.cs
- SpeechSeg.cs
- ToolboxComponentsCreatedEventArgs.cs
- CacheMemory.cs
- GlobalizationSection.cs
- FixedElement.cs
- SqlLiftWhereClauses.cs
- FlatButtonAppearance.cs
- ListItemCollection.cs
- LinkedList.cs
- CompareInfo.cs
- InterleavedZipPartStream.cs
- ISCIIEncoding.cs
- HtmlCalendarAdapter.cs
- XPathSelectionIterator.cs
- ToggleButtonAutomationPeer.cs
- WindowsAuthenticationEventArgs.cs
- SafeRsaProviderHandle.cs
- StylusPointPropertyInfoDefaults.cs
- NameSpaceEvent.cs
- RightsManagementManager.cs
- UdpDiscoveryMessageFilter.cs
- Encoder.cs
- EntityDataSourceMemberPath.cs
- ThicknessAnimationBase.cs
- PropertyChangingEventArgs.cs
- ListItemDetailViewAttribute.cs
- ListViewItem.cs
- EntityTypeEmitter.cs
- TextElementEditingBehaviorAttribute.cs
- Wizard.cs
- StdRegProviderWrapper.cs
- RsaKeyGen.cs
- ProjectionAnalyzer.cs
- MD5CryptoServiceProvider.cs
- CustomAttributeBuilder.cs
- TextEditorTables.cs
- ControlAdapter.cs
- ServiceControllerDesigner.cs
- DependencyPropertyKind.cs
- CompilerTypeWithParams.cs
- SafeNativeMethods.cs
- CreateUserErrorEventArgs.cs
- XmlSignificantWhitespace.cs
- ToolStripLabel.cs
- FileSecurity.cs
- DateTimeSerializationSection.cs
- InsufficientMemoryException.cs
- DropShadowBitmapEffect.cs
- CatalogPart.cs
- Material.cs
- ListBase.cs
- UITypeEditor.cs
- Transform.cs
- AmbientLight.cs
- SerializableAttribute.cs
- WindowsListBox.cs
- ILGenerator.cs
- DPCustomTypeDescriptor.cs
- DefaultConfirmation.cs
- SystemWebCachingSectionGroup.cs
- SiteMapDataSourceView.cs
- FileDataSourceCache.cs
- SafeRightsManagementQueryHandle.cs
- FlowLayoutSettings.cs
- BuildProviderCollection.cs
- DataControlLinkButton.cs
- ReceiveCompletedEventArgs.cs
- XmlDictionaryReader.cs
- FixedFindEngine.cs
- FontInfo.cs
- SettingsBase.cs
- CacheVirtualItemsEvent.cs
- ToolStripDropTargetManager.cs
- CodeGen.cs
- BooleanKeyFrameCollection.cs
- AsymmetricAlgorithm.cs
- CryptoApi.cs
- DataIdProcessor.cs
- SecureStringHasher.cs
- ProgressBar.cs
- FastEncoderWindow.cs
- HwndMouseInputProvider.cs
- Filter.cs
- CommandValueSerializer.cs
- Label.cs
- StorageConditionPropertyMapping.cs