⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 hyperlink.cs

📁 不错的人事管理系统
💻 CS
字号:
using System;

namespace System.Web.UI.WebControls
{
	/// <summary>
	/// Summary description for HyperLink.
	/// </summary>
	//.custom instance void System.Web.UI.ParseChildrenAttribute::.ctor(bool) 
	//.custom instance void System.Web.UI.DataBindingHandlerAttribute
	//.custom instance void [System]System.ComponentModel.DefaultPropertyAttribute
	//.custom instance void [System]System.ComponentModel.DesignerAttribute
	//.custom instance void [System]System.ComponentModel.DesignerAttribute
	//.custom instance void System.Web.UI.ControlBuilderAttribute
	public class HyperLink : WebControl
	{

		public HyperLink() : base(HtmlTextWriterTag.A) 
		{
		}

		protected virtual void AddAttributesToRender(HtmlTextWriter writer) 
		{
			string local0;

			this.AddAttributesToRender(writer);
			local0 = this.NavigateUrl;
			if (local0.Length > 0)
				writer.AddAttribute(HtmlTextWriterAttribute.Href, this.ResolveUrl(local0));
			local0 = this.Target;
			if (local0.Length > 0)
				writer.AddAttribute(HtmlTextWriterAttribute.Target, local0);
		}

		protected virtual void AddParsedSubObject(object obj) 
		{
			string local0;

			if (this.HasControls()) 
			{
				this.AddParsedSubObject(obj);
				return;
			}
			if (obj as LiteralControl != null) 
			{
				this.Text = ((LiteralControl) obj).Text;
				return;
			}
			local0 = this.Text;
			if (local0.Length != 0) 
			{
				this.Text = System.String.Empty;
				this.AddParsedSubObject(new LiteralControl(local0));
			}
			this.AddParsedSubObject(obj);
		}

		protected virtual void LoadViewState(object savedState) 
		{
			string local0;

			if (savedState != null) 
			{
				this.LoadViewState(savedState);
				local0 = (String) this.ViewState["Text"];
				if (local0 != null)
					this.Text = local0;
			}
		}

		protected virtual void RenderContents(HtmlTextWriter writer) 
		{
			string local0;
			Image local1;

			local0 = this.ImageUrl;
			if (local0.Length > 0) 
			{
				local1 = new Image();
				local1.ImageUrl = this.ResolveUrl(local0);
				local0 = this.ToolTip;
				if (local0.Length != 0)
					local1.ToolTip = local0;
				local0 = this.Text;
				if (local0.Length != 0)
					local1.AlternateText = local0;
				local1.RenderControl(writer);
				return;
			}
			if (this.HasControls()) 
			{
				this.RenderContents(writer);
				return;
			}
			writer.Write(this.Text);
		}

		public virtual string ImageUrl 
		{
			get
			{
				string local0;

				local0 = (String) this.ViewState["ImageUrl"];
				if (local0 != null)
					return local0;
				return System.String.Empty;
			}
			set
			{
				this.ViewState["ImageUrl"]= value;
			}
		}

		public string NavigateUrl 
		{
			get
			{
				string local0;

				local0 = (String) this.ViewState["NavigateUrl"];
				if (local0 != null)
					return local0;
				return System.String.Empty;
			}
			set
			{
				this.ViewState["NavigateUrl"]= value;
			}
		}

		public string Target 
		{
			get
			{
				string local0;

				local0 = (String) this.ViewState["Target"];
				if (local0 != null)
					return local0;
				return System.String.Empty;
			}
			set
			{
				this.ViewState["Target"]= value;
			}
		}

		public virtual string Text 
		{
			get
			{
				object local0;

				local0 = this.ViewState["Text"];
				if (local0 != null)
					return (String) local0;
				return System.String.Empty;
			}
			set
			{
				if (this.HasControls())
					this.Controls.Clear();
				this.ViewState["Text"]= value;
			}
		}
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -