Esempio n. 1
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)));
            }
        }
Esempio n. 2
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)));
            }
        }