present iam developing one simple blog site.
the UI is
Date: Textbox
Message:Textbox
Keywords:Textbox
Subject:Textbox
like this.along with these controls displaying 12 buttons on behalfof 12 months,
like Jan,feb,mar,....December.
when we enter the data in controls and press submit button the data will be stored in Database.if we want to see the perticular monthof data,just press the regarding month button ,now the data of perticular month will be binded to gridview and display this gridview in next page.
i write the code for perticular month (November)
protected void november_Click(object sender, EventArgs e)
{
Response.Redirect("Messages.aspx");
}
and in Message.aspx to show the data in gridview
ds = l2.nov();
g1.DataSource = ds;
g1.DataBind();
if in this condition i write the code for every month button click event in the sense the code is very huge.
is there any loop for reducing the code.if yes pls give the explanation
please give me reply to reduce the code.