code for create LI one object for showing year with increment.
#region BINDYEAR
private void BINDYEAR()
{
try
{
int A = 1800;
for (int i = 0; i < 20; i++)
{
ListItem LI = new ListItem();
LI.Text = Convert.ToInt16(A).ToString();
LI.Value = A.ToString();
A=A+1;
ddl_year.Items.Add(LI);
}
ddl_year.Items.Insert(0, "YYYY");
}
catch (Exception errmsg)
{
Response.Write(errmsg.Message.ToString());
}
}
#endregion
1 comment :
Nice explanation.
dot net training in chennai
Post a Comment