Please How can I show what is selected on the grid view to the details view I have a drop down link for search first on on btn_Search it query the the database and populate the information on the grid view // gridview.datasource = null; gridview.databind(); datatable dt = me.query("select * from law where id = '" + drpL.selectedvalue +"'"); if (dt.rows.count > 0 ) { gridview.datasource = dt detailsview.datasource = dt gridview.databind(); detailsview.databind(); } // that is my select statement, I enabled selection...onselectedindexchanged="GridView_SelectedIndexChanged" /* My question is How do i on the code view write a simple code that will enable me to select a row and it will appear on the details view? protected void GridView_SelectedIndexChanged(object sender, EventArgs e) { } Can Some one help me out on this.. thanks */
GridViewRow row = GridView.SelectedRow;
MessageLabel.Text = "You selected " + row.Cells[2].Text + ".";
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)