Add years(data) in Dropdownlist in .cs page
#region BINDYEAR
private void BINDYEAR()
{
try
{
int A = 1930;
for (int i = 0; i < 64; i++)
{
ListItem LI = new ListItem();
LI.Text = Convert.ToInt16(A).ToString();
LI.Value = A.ToString();
A = A + 1;
DropDownList1.Items.Add(LI);
}
DropDownList1.Items.Insert(0, "YYYY");
}
catch (Exception errmsg)
{
Response.Write(errmsg.Message.ToString());
}
}
#endregion
No comments:
Post a Comment