Mark,
I give you the whole code-behind to be sure i didn't forget more things:
this gives the error "Object reference not set to an instance of an object."
at the line: " hr.Visible = True"
When the user clicks on the Select Button of the gridview, the line must
appear (and also a detailsview not mentioned here).
Protected Sub GridView1_SelectedIndexChanged(ByVal sender As Object, ByVal
e As System.EventArgs) Handles GridView1.SelectedIndexChanged
DetailsView1.Visible = True
Dim hr As HtmlControl
hr = FindControl("hr1")
hr.Visible = True
End Sub
The aspx-file:
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1"
Runat="Server">
<asp:GridView ID="GridView1" runat="server" AllowPaging="True"
AllowSorting="True"
......
</asp:GridView>
<hr id="hr1" runat="server" visible="false" color="#008080" />
.....
</asp:Content>
"Mark Rae" <ma**@markNOSPAMrae.comschreef in bericht
news:%2****************@TK2MSFTNGP03.phx.gbl...
"Mich" <ss**@xxcv.azwrote in message
news:eJ**************@TK2MSFTNGP04.phx.gbl...
>Mark, this was the answer on your question:
"So is the code running behind the MasterPage or the content page...?"
My answer is: "this is the code-behind of the content page"
The code is the same as already posted:
Dim hr As HtmlControl
hr = FindControl("hr1")
hr.visible= True
Sorry - I appreciate that English isn't your first language...
I'm not sure what the problem is - this works fine for me in a content
page...