Code:
/ FXUpdate3074 / FXUpdate3074 / 1.1 / DEVDIV / depot / DevDiv / releases / whidbey / QFE / 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. //------------------------------------------------------------------------------ //// 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.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- TypedColumnHandler.cs
- ScriptReference.cs
- CacheMemory.cs
- SmtpMail.cs
- WindowsAltTab.cs
- CodeDelegateInvokeExpression.cs
- RangeValidator.cs
- Header.cs
- PropertyEmitterBase.cs
- ReverseComparer.cs
- MethodBuilderInstantiation.cs
- NestedContainer.cs
- DateTimeOffsetStorage.cs
- XamlTreeBuilder.cs
- filewebrequest.cs
- DataSourceDescriptorCollection.cs
- Label.cs
- Compiler.cs
- XmlSerializerSection.cs
- TCPListener.cs
- BuildProviderUtils.cs
- DesignSurfaceManager.cs
- DataServiceBuildProvider.cs
- Visual.cs
- DataGridCellInfo.cs
- SharedStatics.cs
- DataControlField.cs
- ControlEvent.cs
- SecurityVerifiedMessage.cs
- ToolboxItemWrapper.cs
- OrderablePartitioner.cs
- EntityDataSourceWizardForm.cs
- NamedPipeProcessProtocolHandler.cs
- NameValueConfigurationElement.cs
- DirectionalLight.cs
- SerialPinChanges.cs
- DelegateInArgument.cs
- ProbeDuplex11AsyncResult.cs
- TimeoutStream.cs
- ColorContextHelper.cs
- ArrayExtension.cs
- FormsAuthenticationEventArgs.cs
- XamlTemplateSerializer.cs
- XmlElementAttributes.cs
- LoadGrammarCompletedEventArgs.cs
- DataGridViewToolTip.cs
- Range.cs
- EdmProviderManifest.cs
- AuthenticatedStream.cs
- HttpListenerContext.cs
- AppDomainFactory.cs
- DictionaryEntry.cs
- StrokeNodeData.cs
- CommonObjectSecurity.cs
- HMACSHA512.cs
- StorageEndPropertyMapping.cs
- UserControlBuildProvider.cs
- HttpResponse.cs
- LinkLabelLinkClickedEvent.cs
- IdleTimeoutMonitor.cs
- TimeSpanSecondsConverter.cs
- MetadataSerializer.cs
- BuildProviderInstallComponent.cs
- AssemblyEvidenceFactory.cs
- AssemblyAttributesGoHere.cs
- DeviceFiltersSection.cs
- SecurityUtils.cs
- Rss20FeedFormatter.cs
- httpapplicationstate.cs
- PageCatalogPart.cs
- LogicalChannelCollection.cs
- MatrixCamera.cs
- DataGridViewLayoutData.cs
- InvokeHandlers.cs
- OleServicesContext.cs
- DeviceSpecificChoice.cs
- MsdtcWrapper.cs
- TextEditorTyping.cs
- ContentDesigner.cs
- TreeViewTemplateSelector.cs
- PreservationFileWriter.cs
- FileSecurity.cs
- DefaultObjectMappingItemCollection.cs
- _LocalDataStore.cs
- EventHandlerList.cs
- EnlistmentState.cs
- TargetException.cs
- MultiSelectRootGridEntry.cs
- Label.cs
- FatalException.cs
- CommandDesigner.cs
- ParameterModifier.cs
- BinaryObjectReader.cs
- InfocardChannelParameter.cs
- ElapsedEventArgs.cs
- DesignerDataParameter.cs
- DbMetaDataFactory.cs
- FixedSOMPageConstructor.cs
- FieldBuilder.cs
- ExpressionConverter.cs