Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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
- WindowsEditBox.cs
- GPRECT.cs
- SizeConverter.cs
- DesignerDataSchemaClass.cs
- RawKeyboardInputReport.cs
- RoleServiceManager.cs
- StringReader.cs
- RootBrowserWindow.cs
- WebBrowserProgressChangedEventHandler.cs
- ResourceContainer.cs
- EntityCollectionChangedParams.cs
- Sorting.cs
- CodeArrayIndexerExpression.cs
- NullableConverter.cs
- Hex.cs
- QilNode.cs
- CodeThrowExceptionStatement.cs
- InvokeMemberBinder.cs
- SamlConstants.cs
- SystemResourceHost.cs
- XmlSchemaAny.cs
- WebControl.cs
- WebBrowserNavigatingEventHandler.cs
- ActivityStateRecord.cs
- ConfigurationLockCollection.cs
- XmlNodeReader.cs
- SamlSubject.cs
- TreeNodeEventArgs.cs
- BrowserCapabilitiesCompiler.cs
- autovalidator.cs
- DataBindingCollection.cs
- DtdParser.cs
- PartialCachingControl.cs
- BlobPersonalizationState.cs
- ScriptModule.cs
- RequestedSignatureDialog.cs
- CapabilitiesAssignment.cs
- WebConfigurationHost.cs
- CodeParameterDeclarationExpression.cs
- ComponentDispatcherThread.cs
- HwndAppCommandInputProvider.cs
- DiscoveryServiceExtension.cs
- XmlDataContract.cs
- RayMeshGeometry3DHitTestResult.cs
- PropertyEmitter.cs
- StateMachineWorkflow.cs
- FunctionImportMapping.cs
- XmlCustomFormatter.cs
- IChannel.cs
- Stopwatch.cs
- XmlException.cs
- TemplateControlParser.cs
- FontWeight.cs
- CryptoConfig.cs
- OutputCache.cs
- EditableLabelControl.cs
- HttpBufferlessInputStream.cs
- MenuCommand.cs
- DataControlImageButton.cs
- SubMenuStyleCollection.cs
- DataBindingList.cs
- TabControl.cs
- XmlSchemaSequence.cs
- LOSFormatter.cs
- TypeSystem.cs
- CheckedListBox.cs
- DateTimeValueSerializerContext.cs
- ContextStack.cs
- KnownIds.cs
- SplashScreenNativeMethods.cs
- HttpListenerContext.cs
- EncoderFallback.cs
- StyleXamlParser.cs
- SolidBrush.cs
- HttpRequestBase.cs
- InvalidDataException.cs
- TagMapInfo.cs
- SourceFilter.cs
- ThrowHelper.cs
- FlowDecision.cs
- ObjectCache.cs
- Stream.cs
- LineGeometry.cs
- DefaultValueMapping.cs
- RichTextBox.cs
- ControlValuePropertyAttribute.cs
- Rect3DValueSerializer.cs
- CacheHelper.cs
- XPathDocumentBuilder.cs
- autovalidator.cs
- TimelineCollection.cs
- ServiceReference.cs
- CacheModeConverter.cs
- FlowDocumentPage.cs
- SoapAttributes.cs
- HttpModuleCollection.cs
- DbDataAdapter.cs
- XmlCharType.cs
- RotateTransform3D.cs
- FixedPageAutomationPeer.cs