Linking GridView to DetailView
Hello again everyone,
I have a GridView to display part of the data in the db (not all), and on the GridView, I have a link of "Edit"(Update&Cancel), "Delete", "All Detail" and "Exit"(re-direct to.aspx), I also create another web form for DetailsView.aspx to display all information from db, viewing all data from db one at a time is base on the StateID drop down list from databound placed above the Detail1View1
- So my first question is how do I link the "StateID" drop down list from databound to the DetailsView1, ex: if I select the State Id #1, it shows all information in StateID #1 and for StateID #2 if selected should show all information in StateID #2
-Second question is, how do I link the DetailsView1 to GridView1, when click "All Detail" link on the GridView, mostly in GridView form, I wrote a code behind for binding, edit, delete and Exit command link I called it in the GridView1_SelectedIndexChanged and re-directed back to the original form, I try to call the same way to "All Detail", but it's not working, can somone guide me thru this? below is my exit called to re-directed back to the original form
protected void GridView1_SelectedIndexChanged(object sender, EventArgs e)
{
// Response.Redirect("DetailsView");
Response.Redirect("bsform.aspx");
}
-
|