01.
protected
void
Page_Load(
object
sender, EventArgs e)
02.
{
03.
for
(
int
i = 1; i <= 10; i++)
04.
{
05.
numlist.Add(i);
06.
}
07.
08.
DropDownList1.DataSource = numlist;
09.
DropDownList1.DataBind();
10.
}
11.
12.
List<
int
> numlist =
new
List<
int
>();
13.
14.
protected
void
myGridview_RowDataBound(
object
sender, GridViewRowEventArgs e)
15.
{
16.
if
(e.Row.RowType == DataControlRowType.DataRow)
17.
{
18.
Label number = (Label)e.Row.FindControl(
"lbDuration36y"
);
19.
numlist.Remove(Convert.ToInt32(number.Text));
20.
}
21.
}