示例#1
0
        public HtmlSubmit(string name, bool verbose, string parameter)
            : base(verbose ? name : string.Empty)
        {
            attributes.Add(attrType = new AttrType("button"));

            attributes.Add(attrDisabled = new AttrDisabled());

            events.Add(eventClick = new EventClick(string.Format("__doPostBack('{0}', '{1}');", name, parameter)));
        }
示例#2
0
        public HtmlOption(string value)
            : base("")
        {
            attributes.Add(attrDisabled = new AttrDisabled());

            attributes.Add(attrValue = new AttrValue(value));

            attributes.Add(attrSelected = new AttrSelected());
        }
示例#3
0
        public HtmlButton(string name, string onClick)
            : base(name)
        {
            attributes.Add(attrType = new AttrType("button"));

            attributes.Add(attrDisabled = new AttrDisabled());

            attributes.Add(attrValue = new AttrValue());

            events.Add(eventClick = new EventClick(onClick));
        }
示例#4
0
        public HtmlRadioGroup(string name, bool verbose, bool isPostBack)
            : base(verbose ? name : "")
        {
            attrName = new AttrName(name);

            attributes.Add(attrDisabled = new AttrDisabled());

            if (isPostBack)
            {
                events.Add(eventChange = new EventChange(string.Format("__doPostBack('{0}', '');", name)));
            }
        }
示例#5
0
        public HtmlInput(string idName, string name, string type)
            : base(idName)
        {
            attributes.Add(attrReadOnly = new AttrReadOnly());

            attributes.Add(attrDisabled = new AttrDisabled());

            attributes.Add(attrType = new AttrType(type));

            attributes.Add(attrName = new AttrName(name));

            attributes.Add(attrValue = new AttrValue());
        }
示例#6
0
        public HtmlSelect(string name, bool multiple, bool isPostBack)
            : base(name)
        {
            attributes.Add(attrName = new AttrName(name));

            attributes.Add(attrDisabled = new AttrDisabled());

            attributes.Add(attrMultiple = new AttrMultiple(multiple));

            attributes.Add(attrSize = new AttrSize());

            if (isPostBack)
            {
                events.Add(eventChange = new EventChange(string.Format("__doPostBack('{0}', '');", name)));
            }
        }
示例#7
0
        public HtmlSelect(string name, int size, bool isPostBack)
            : base(name)
        {
            attributes.Add(attrName = new AttrName(name));

            attributes.Add(attrDisabled = new AttrDisabled());

            attributes.Add(attrMultiple = new AttrMultiple(true));

            if (size < 1)
            {
                throw new ArgumentException();
            }
            else
            {
                attributes.Add(attrSize = new AttrSize(size));
            }

            if (isPostBack)
            {
                events.Add(eventChange = new EventChange(string.Format("__doPostBack('{0}', '');", name)));
            }
        }