I am trying to get an image on a page to change when someone clicks on a datagrid hyperlink column. The idea is change an image src (URL) on the page when this happens. I can get the grid to format properly but not quite sure how the "javascript:golink(1) type code works and how to get this click event on the grid to automatically change the IMG tag URL.
<Columns>
<asp:TemplateColumn HeaderText="Sample Date">
<HeaderTemplate>
<b><i>Sample Date</i></b>
</HeaderTemplate>
<ItemTemplate>
<asp:HyperLink
id=HyperLink1
DataNavigateUrlFormatString='<%#databinder.eval(container.dataitem, "SampleDate", "{0:d}"%>'
Text='text>
</asp:HyperLink>
</ItemTemplate>
</asp:TemplateColumn>
</Columns>
</aspataGrid>
....
....
....
<IMG Name="myimage" style="Z-INDEX: 102; LEFT: 177px src="mypage.aspx?date={date from Datagrid on click">
....
....
...the idea being that when the datagrid is clicked on, the date is passed to the data querystring of the URL of the image and therefore the image reloads.
Thanks!
</TD>
<Columns>
<asp:TemplateColumn HeaderText="Sample Date">
<HeaderTemplate>
<b><i>Sample Date</i></b>
</HeaderTemplate>
<ItemTemplate>
<asp:HyperLink
id=HyperLink1
DataNavigateUrlFormatString='<%#databinder.eval(container.dataitem, "SampleDate", "{0:d}"%>'
Text='text>
</asp:HyperLink>
</ItemTemplate>
</asp:TemplateColumn>
</Columns>
</aspataGrid>
....
....
....
<IMG Name="myimage" style="Z-INDEX: 102; LEFT: 177px src="mypage.aspx?date={date from Datagrid on click">
....
....
...the idea being that when the datagrid is clicked on, the date is passed to the data querystring of the URL of the image and therefore the image reloads.
Thanks!
</TD>