I am having trouble with some code. When a row is selected in a GridView, the DetailView should be visibile. I am doing this by using the code in the snippet, but for some reason I can't see the DetailView when a row is selected in the GridView.
BTW, I am using the code below in ASP.net to tell the DetailsView which value to take from the GridView
<asp:ControlParameter ControlID="GridView1" DefaultValue="0" Name="ThreadPostID"
e" Type="Int32" />
What do you suggest that I change? Thanks!
public partial class _Default : BasePage
protected void Page_Load(object sender, EventArgs e)
this.DetailsView1.Visible = false;
protected void GridView1_SelectedIndexChanging(object sender, GridViewSelectEventArgs e)
this.DetailsView1.PageIndex = e.NewSelectedIndex;
this.DetailsView1.Visible = true;