onedizzydevil
Programmer
By using a datagrid I created a list of records, in order to get more information about a record you need to click on the record title. How can I create a hyperlinked record title that has the record unique identifier (in this case gid) as part of the hyperlink (i.e. test.aspx?gid=1234). Below I have pasted in some code that found on several other websites but it does not seem to work, how is {0} suppose to do anything where it is at. I know this is suppose to represent the ordinal number of the column from the database and it does if it where to actually work but the only thing that gets past is {0}. Additionally, I have tryed putting in '[tt]NavigateUrl="test.aspx?gid=<%# Container.DataItem("gid"%>"[/tt]' and '[tt]NavigateUrl="test.aspx?gid=" & <%# Container.DataItem("gid"%>"[/tt]' but neither work. I do have the datakeyfield set to gid if that can be used.
Any ideas?
//sample code received from serveral websites//
<asp:TemplateColumn>
<ItemTemplate>
<asp:HyperLink NavigateUrl="test.aspx?gid={0}"><%# Container.DataItem("label"%></asp:HyperLink>
</ItemTemplate>
</asp:TemplateColumn>
Thanks!
Wayne Sellars
"Programming, today is a race between software developers, striving to build bigger and better idiot-proof programs, and the Universe, trying to produce bigger and better idiots. So far, Universe 1 - Programmers 0."
Any ideas?
//sample code received from serveral websites//
<asp:TemplateColumn>
<ItemTemplate>
<asp:HyperLink NavigateUrl="test.aspx?gid={0}"><%# Container.DataItem("label"%></asp:HyperLink>
</ItemTemplate>
</asp:TemplateColumn>
Thanks!
Wayne Sellars
"Programming, today is a race between software developers, striving to build bigger and better idiot-proof programs, and the Universe, trying to produce bigger and better idiots. So far, Universe 1 - Programmers 0."