Hidistro.UI.Common.Controls/ListRadioButton.cs

(开头部分) 3KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

namespace Hidistro.UI.Common.Controls
{
    using System;
    using System.Collections.Specialized;
    using System.Globalization;
    using System.Web.UI;
    using System.Web.UI.WebControls;

    [ToolboxData("<{0}:ListRadioButton runat=server></{0}:ListRadioButton>")]
    public class ListRadioButton : RadioButton, IPostBackDataHandler
    {
        protected override void Render(HtmlTextWriter output)
        {
            this.RenderInputTag(output);
        }

        private void RenderInputTag(HtmlTextWriter htw)
        {
            htw.AddAttribute(HtmlTextWriterAttribute.Id, this.ClientID);
            htw.AddAttribute(HtmlTextWriterAttribute.Type, "radio");
            htw.AddAttribute(HtmlTextWriterAttribute.Name, this.GroupName);
            htw.AddAttribute(HtmlTextWriterAttribute.Value, this.Value);
            if (this.Checked)
            {
                htw.AddAttribute(HtmlTextWriterAttribute.Checked, "checked");
            }
            if (!this.Enabled)
            {
                htw.AddAttribute(HtmlTextWriterAttribute.Disabled, "disabled");
            }
            string str = base.Attributes["onclick"];
            if (this.AutoPostBack)
            {
                if (str != null)
                {
                    str = string.Empty;
                }
                str = str + this.Page.ClientScript.GetPostBackEventReference(this, string.Empty);
                htw.AddAttribute(HtmlTextWriterAttribute.Onclick, str);
                htw.AddAttribute("language", "javascript");
            }
            else if (str != null)
            {
                htw.AddAttribute(HtmlTextWriterAttribute.Onclick, str);
            }
            if (this.AccessKey.Length > 0)
            {
                htw.AddAttribute(HtmlTextWriterAttribute.Accesskey, this.AccessKey);
            }
            if (this.TabIndex != 0)
            {
                htw.AddAttribute(HtmlTextWriterAttribute.Tabindex, this.TabIndex.ToString(NumberFormatInfo.InvariantInfo));
            }
            htw.RenderBeginTag(HtmlTextWriterTag.Input);
            htw.RenderEndTag();
        }

        bool IPostBackDataHandler.LoadPostData(string postDataKey, NameValueCollection postCollection)
        {
            bool flag = false;
后面还有 37 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。