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)));
        }
        public HtmlOption(string value)
            : base("")
        {
            attributes.Add(attrDisabled = new AttrDisabled());

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

            attributes.Add(attrSelected = new AttrSelected());
        }
        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));
        }
Exemple #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)));
            }
        }
Exemple #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());
        }
        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)));
            }
        }
        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)));
            }
        }