Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / xsp / System / Web / UI / HtmlControls / HtmlLink.cs / 1305376 / HtmlLink.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.UI.HtmlControls { using System; using System.Security; using System.Security.Permissions; using System.ComponentModel; [ ControlBuilderAttribute(typeof(HtmlEmptyTagControlBuilder)) ] public class HtmlLink : HtmlControl { public HtmlLink() : base("link") { } [ WebCategory("Action"), DefaultValue(""), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden), UrlProperty(), ] public virtual string Href { get { string s = Attributes["href"]; return ((s != null) ? s : String.Empty); } set { Attributes["href"] = MapStringAttributeToString(value); } } protected override void RenderAttributes(HtmlTextWriter writer) { // Resolve the client href based before rendering the attribute. if (!String.IsNullOrEmpty(Href)) { Attributes["href"] = ResolveClientUrl(Href); } base.RenderAttributes(writer); } protected internal override void Render(HtmlTextWriter writer) { writer.WriteBeginTag(TagName); RenderAttributes(writer); writer.Write(HtmlTextWriter.SelfClosingTagEnd); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.UI.HtmlControls { using System; using System.Security; using System.Security.Permissions; using System.ComponentModel; [ ControlBuilderAttribute(typeof(HtmlEmptyTagControlBuilder)) ] public class HtmlLink : HtmlControl { public HtmlLink() : base("link") { } [ WebCategory("Action"), DefaultValue(""), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden), UrlProperty(), ] public virtual string Href { get { string s = Attributes["href"]; return ((s != null) ? s : String.Empty); } set { Attributes["href"] = MapStringAttributeToString(value); } } protected override void RenderAttributes(HtmlTextWriter writer) { // Resolve the client href based before rendering the attribute. if (!String.IsNullOrEmpty(Href)) { Attributes["href"] = ResolveClientUrl(Href); } base.RenderAttributes(writer); } protected internal override void Render(HtmlTextWriter writer) { writer.WriteBeginTag(TagName); RenderAttributes(writer); writer.Write(HtmlTextWriter.SelfClosingTagEnd); } } } // 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
- DataObject.cs
- sortedlist.cs
- InternalConfigRoot.cs
- DuplicateWaitObjectException.cs
- ListBoxItemWrapperAutomationPeer.cs
- LongAverageAggregationOperator.cs
- TriggerActionCollection.cs
- AmbientLight.cs
- CodeDelegateInvokeExpression.cs
- TreeViewDataItemAutomationPeer.cs
- HeaderPanel.cs
- XmlNodeChangedEventArgs.cs
- FeatureSupport.cs
- NativeObjectSecurity.cs
- HwndAppCommandInputProvider.cs
- SafeWaitHandle.cs
- Translator.cs
- BlurBitmapEffect.cs
- MatrixValueSerializer.cs
- MetricEntry.cs
- FormatStringEditor.cs
- DisableDpiAwarenessAttribute.cs
- FacetValueContainer.cs
- SubpageParaClient.cs
- CompensationDesigner.cs
- PeerCustomResolverBindingElement.cs
- TimeSpan.cs
- SessionStateContainer.cs
- CodeDomSerializerBase.cs
- SortDescriptionCollection.cs
- WindowsEditBox.cs
- PropertyRecord.cs
- ElementUtil.cs
- ThreadInterruptedException.cs
- TaiwanCalendar.cs
- FrameworkElement.cs
- PermissionRequestEvidence.cs
- AccessText.cs
- MouseEvent.cs
- WebPartDisplayModeCollection.cs
- Button.cs
- OrderingExpression.cs
- NextPreviousPagerField.cs
- _WebProxyDataBuilder.cs
- WebPartAuthorizationEventArgs.cs
- ReadOnlyHierarchicalDataSource.cs
- TextTreeFixupNode.cs
- QilSortKey.cs
- xsdvalidator.cs
- EventToken.cs
- ListControlActionList.cs
- MeasureData.cs
- SymbolType.cs
- OleDbErrorCollection.cs
- LayoutUtils.cs
- ToolStripPanelRenderEventArgs.cs
- Size.cs
- URI.cs
- ContextMenu.cs
- QuaternionAnimation.cs
- PhysicalOps.cs
- XhtmlBasicLinkAdapter.cs
- CodeSnippetTypeMember.cs
- ErrorWrapper.cs
- ToolStripSplitStackLayout.cs
- RegexWorker.cs
- SchemaElementLookUpTable.cs
- ConfigXmlSignificantWhitespace.cs
- ItemAutomationPeer.cs
- BuildProvider.cs
- DataGridRowHeaderAutomationPeer.cs
- OperatorExpressions.cs
- CfgParser.cs
- PartBasedPackageProperties.cs
- BindingSource.cs
- QilInvokeEarlyBound.cs
- CellCreator.cs
- PagePropertiesChangingEventArgs.cs
- SimpleHandlerBuildProvider.cs
- sqlnorm.cs
- DataControlField.cs
- DetailsViewPagerRow.cs
- UnsafeNativeMethods.cs
- DataGridViewCellCancelEventArgs.cs
- SequenceDesigner.cs
- AutomationElementCollection.cs
- WinFormsUtils.cs
- Bezier.cs
- ImageListDesigner.cs
- TreeView.cs
- NativeWindow.cs
- XmlElementList.cs
- DownloadProgressEventArgs.cs
- AudioFormatConverter.cs
- XmlSchemaSimpleTypeUnion.cs
- InlinedAggregationOperatorEnumerator.cs
- RNGCryptoServiceProvider.cs
- SmiMetaDataProperty.cs
- SafeViewOfFileHandle.cs
- DataGridColumnStyleMappingNameEditor.cs