Here is my code...
<%-- <%-- | |||||||||
cs code;
protected void Button1_Click(object sender, EventArgs e)
{
bind();
}
public void bind()
{
try
{
Con.Open();
Sdap = new SqlDataAdapter("select T_Id,[Name],Class,Section from student where Section='" + DropDownList1.SelectedItem.ToString() + "'", Con);
DataSet Ds = new DataSet();
Sdap.Fill(Ds);
GridView1.DataSource = Ds;
GridView1.DataBind();
}
catch (Exception Ex)
{
Response.Write(Ex.ToString());
}
finally
{
Con.Close();
}
}

Suthish NairPosted Sep 13, 2013, 7:59 AM
Satyapriya NayakPosted Sep 13, 2013, 1:31 AM