need to show the attendance for a particular month
if i type the id as 1 i have to show the current month attendance
this is my design
<form id="form1" runat="server">
<asp:MultiView ID="MultiView1" runat="server">
<asp:View ID="View1" runat="server">
<table>
<tr>
<td>
<asp:Label ID="Label1" runat="server" Text="ID"></asp:Label>
</td>
<td>
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
</td>
</tr>
<tr align="center">
<td align="center">
<asp:ImageButton ID="ImageButton1" runat="server" ImageUrl="~/Images/show.jpg"
Width="89px" onclick="ImageButton1_Click" />
</td>
</tr>
</table>
</asp:View>
<asp:View ID="View2" runat="server">
<asp:GridView ID="GridView1" runat="server" CellPadding="4" ForeColor="#333333"
GridLines="None"
AutoGenerateColumns="False">
<RowStyle BackColor="#EFF3FB" />
<Columns>
<asp:BoundField DataField="ID" HeaderText="Id" />
<asp:BoundField DataField="Date" HeaderText="Date" />
<asp:BoundField DataField="Name" HeaderText="Name" />
<asp:BoundField DataField="Status" HeaderText="Status" />
<asp:BoundField DataField="Section" HeaderText="Section" />
<asp:BoundField DataField="Intime" HeaderText="Intime" />
</Columns> </asp:GridView>
Total presents
<asp:Label ID="lblStatusCount" runat="server" />
<asp:Button ID="Button1" runat="server" Text="Clear" onclick="Button1_Click" />
</asp:View>
</asp:MultiView>
</form>
this is my code
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Data.SqlClient;
public partial class Employee_Total_Days : System.Web.UI.Page
{
Marvel mml = new Marvel();
DataSet sds = new DataSet();
protected void Page_Load(object sender, EventArgs e)
{
MultiView1.Visible = true;
MultiView1.SetActiveView(View1);
}
protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
{
MultiView1.SetActiveView(View2);
string vew = "select Id,Date,Name,Status,Section,Intime from aten where Id='" + TextBox1.Text + "'";
sds = mml.GETDS(vew);
GridView1.DataSource = sds;
GridView1.DataBind();
int count = 0;
foreach (GridViewRow row in this.GridView1.Rows)
{
if (row.Cells[3].Text == "Present")
{
count++;
}
}
this.lblStatusCount.Text = count.ToString();
}
protected void Button1_Click(object sender, EventArgs e)
{
MultiView1.Visible = true;
MultiView1.SetActiveView(View1);
TextBox1.Text = "";
}
}
the label shows the present days but it not for a particular month i need for a current month