Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / ndp / fx / src / xsp / System / Web / UI / HtmlControls / HtmlLink.cs / 1 / 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)) ] [AspNetHostingPermission(SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)] [AspNetHostingPermission(SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)] 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)) ] [AspNetHostingPermission(SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)] [AspNetHostingPermission(SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)] 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
- WebPartsPersonalizationAuthorization.cs
- CommandManager.cs
- CacheOutputQuery.cs
- UserControl.cs
- KernelTypeValidation.cs
- BaseTemplateCodeDomTreeGenerator.cs
- DispatchWrapper.cs
- ValidatingReaderNodeData.cs
- OverloadGroupAttribute.cs
- QueryStringParameter.cs
- HealthMonitoringSectionHelper.cs
- DataObjectFieldAttribute.cs
- FixedStringLookup.cs
- InfoCardRSAPKCS1SignatureFormatter.cs
- CuspData.cs
- Win32MouseDevice.cs
- RegularExpressionValidator.cs
- XmlSchemaObjectCollection.cs
- MetafileHeaderEmf.cs
- HttpWebRequestElement.cs
- CopyCodeAction.cs
- ProxyAttribute.cs
- DataGridViewTopLeftHeaderCell.cs
- Image.cs
- CommandTreeTypeHelper.cs
- JsonReader.cs
- AssemblyLoader.cs
- HyperLink.cs
- TextTreeText.cs
- SqlClientWrapperSmiStream.cs
- ReliableMessagingVersionConverter.cs
- UntrustedRecipientException.cs
- LocationUpdates.cs
- ConsoleKeyInfo.cs
- SystemIcmpV4Statistics.cs
- CustomAssemblyResolver.cs
- DispatchWrapper.cs
- SqlConnection.cs
- DbConnectionPoolCounters.cs
- OleDbErrorCollection.cs
- DataList.cs
- PreProcessor.cs
- Compress.cs
- TranslateTransform3D.cs
- InputProcessorProfiles.cs
- Listen.cs
- HttpCookiesSection.cs
- SqlComparer.cs
- Transform.cs
- SoundPlayerAction.cs
- DigitalSignature.cs
- JsonFormatGeneratorStatics.cs
- HierarchicalDataSourceControl.cs
- ThreadAbortException.cs
- TableCellAutomationPeer.cs
- ManifestSignedXml.cs
- XPathDocumentNavigator.cs
- RNGCryptoServiceProvider.cs
- COSERVERINFO.cs
- TypeHelpers.cs
- EdmItemCollection.cs
- EUCJPEncoding.cs
- BitConverter.cs
- XpsFont.cs
- XslNumber.cs
- XmlSchemaSimpleTypeUnion.cs
- Wizard.cs
- PrintingPermission.cs
- DataGridViewBand.cs
- WeakRefEnumerator.cs
- URI.cs
- PersianCalendar.cs
- ImageBrush.cs
- WebSysDescriptionAttribute.cs
- WbmpConverter.cs
- XmlUtil.cs
- XamlLoadErrorInfo.cs
- BuildDependencySet.cs
- ObjectSecurity.cs
- CodeCommentStatementCollection.cs
- ApplyImportsAction.cs
- OdbcEnvironment.cs
- ObjectQueryProvider.cs
- DefaultValueAttribute.cs
- InvokeMethod.cs
- XPathNodeHelper.cs
- SerializationSectionGroup.cs
- QueueProcessor.cs
- LogSwitch.cs
- KeyGestureValueSerializer.cs
- DesignTimeVisibleAttribute.cs
- ItemsPresenter.cs
- ListViewItemMouseHoverEvent.cs
- RuntimeConfig.cs
- XmlNamedNodeMap.cs
- CheckBoxRenderer.cs
- RelatedCurrencyManager.cs
- SecurityPermission.cs
- DataRowCollection.cs
- TextChange.cs