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
- RTLAwareMessageBox.cs
- SmtpReplyReader.cs
- ToolStripSystemRenderer.cs
- WebConfigurationManager.cs
- BulletedList.cs
- DuplicateContext.cs
- CoTaskMemSafeHandle.cs
- ColumnMap.cs
- ExpressionBuilderCollection.cs
- StorageEntitySetMapping.cs
- IItemProperties.cs
- DispatcherFrame.cs
- DispatcherProcessingDisabled.cs
- FixedTextBuilder.cs
- TextRunCacheImp.cs
- TransactionManager.cs
- AppSettingsExpressionEditor.cs
- Label.cs
- JulianCalendar.cs
- VectorValueSerializer.cs
- Enum.cs
- UInt32Converter.cs
- XamlSerializerUtil.cs
- WebReference.cs
- ProviderUtil.cs
- ExpressionBuilder.cs
- EUCJPEncoding.cs
- QueryOptionExpression.cs
- AsyncOperationManager.cs
- EntityDataSourceStatementEditor.cs
- TemplateGroupCollection.cs
- JsonWriterDelegator.cs
- Delegate.cs
- WeakReferenceKey.cs
- InternalUserCancelledException.cs
- PropertyGridDesigner.cs
- SystemInformation.cs
- Line.cs
- WindowCollection.cs
- BrowsableAttribute.cs
- XPathParser.cs
- IntegerValidator.cs
- ObjectReferenceStack.cs
- TriggerActionCollection.cs
- StringCollectionMarkupSerializer.cs
- XmlDataSourceNodeDescriptor.cs
- LocatorPart.cs
- HierarchicalDataBoundControlAdapter.cs
- HtmlInputImage.cs
- DataGridRelationshipRow.cs
- FixedHighlight.cs
- DashStyle.cs
- InvalidCastException.cs
- DataSourceCacheDurationConverter.cs
- EntityFunctions.cs
- CorrelationInitializer.cs
- KeyValueConfigurationCollection.cs
- BinaryMessageEncodingBindingElement.cs
- ParallelTimeline.cs
- WebPartDescription.cs
- ContractComponent.cs
- TreeNodeStyleCollection.cs
- TrackingProfileCache.cs
- ObjectDataSourceStatusEventArgs.cs
- WorkflowElementDialog.cs
- XmlSchemaCollection.cs
- KeyGesture.cs
- CleanUpVirtualizedItemEventArgs.cs
- ControlCollection.cs
- ActivityMarkupSerializer.cs
- HtmlDocument.cs
- ExtenderProvidedPropertyAttribute.cs
- WorkflowElementDialog.cs
- precedingquery.cs
- TypeBuilder.cs
- ResourceType.cs
- PointCollectionConverter.cs
- ToolStripScrollButton.cs
- EntityTypeEmitter.cs
- ElementsClipboardData.cs
- Utils.cs
- ConfigurationElementCollection.cs
- MemberDescriptor.cs
- FacetChecker.cs
- RewritingProcessor.cs
- NameSpaceExtractor.cs
- TextDecorationUnitValidation.cs
- Int64KeyFrameCollection.cs
- DataServiceRequestOfT.cs
- BufferedMessageWriter.cs
- TextPenaltyModule.cs
- PerformanceCounterPermission.cs
- BitmapEffectCollection.cs
- ModelVisual3D.cs
- UserCancellationException.cs
- QueryOperationResponseOfT.cs
- CounterCreationDataCollection.cs
- SmtpTransport.cs
- EdmRelationshipNavigationPropertyAttribute.cs
- DbDeleteCommandTree.cs