1. NewRow
2.
public class ValueAndText
{
private string _value, _text;
public string Value
{
get{return _value;}
}
public string Text
{
get{return _text;}
}
public ValueAndText(string value, string text)
{
this._value = value;
this._text = text;
}
}
ArrayList values = new ArrayList();
values.Add(new ValueAndText("a", "AAA"));
values.Add(new ValueAndText("b", "BBB"));
values.Add(new ValueAndText("c", "CCC"));
DropDown1.DataSource = values;
DropDown1.DataTextField = "Text";
DropDown1.DataValueField = "Value";
DropDown1.DataBind();