On button Click I want to Set the Select command of a Gridview. I do this and then databind the grid but it doesn t work. What am i doing wrong?
protected void bttnView_Click(object sender, EventArgs e)
{
ImageButton bttnView = (ImageButton)sender;
String param1 = bttnView.CommandArgument.Split( , )[0];
String param2 = bttnView.CommandArgument.Split( , )[1];
String param3 = bttnView.CommandArgument.Split( , )[2];
SDSIncidentNotes.SelectCommand = "select * from table Where param1 = " + param1 + " and param2 = " + param2+ " and param3 = " + param3 ;
GridView1.DataBind();
UpdatePanel2.Update();
}