![]() | |
![]() |
| | Thread Tools | Search this Thread | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
The text below is a GridView I am trying to use to display some data froma database. I am using one templatefield of grid because I want the contents of the record fields to appear on three different lines. Everything works except I now want to add an image with which acts as a hyperlink to another page. The querystring to the new page is a field from the database. What I cannot get right is the syntax to build the Hyperlink to the required page using thr NavigateUrl. Can anyone tell me if what I am trying to do is possible? Is it possibleto build up a NavigateUrl using Eval("FixtureID"), something along the linesof Scoreheet.aspx?FixID=Eval("fixtureID") asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataSourceID="AccessDataSource1" Columns asp:TemplateField ShowHeader="False" ItemTemplate table tr td Played at %#HomeTeamName(Eval("Home1"),Eval("Team1"),Eval("T eam2"))% /td td %#Eval("MatchResultText")% /td td rowspan="3" %#Eval("FixtureID")% '================================================= ========================= asp:HyperLink ID="HyperLink1" runat="server" ImageUrl="~/Images/Scoresheet.GIF" NavigateUrl="<%# "Scoresheet.aspx?FixID=" & Eval("FixtureID"))%>" /asp:HyperLink '================================================= ========================= /td /tr tr td %# CricketScore(Eval("Team1"),Eval("Score1"),Eval("Wk ts1"),Eval("Dec"),Eval("O*vers1"))% /td td %# TeamGamePoints(Eval("Team1"),Eval("Points1"))% /td /tr tr td %#CricketScore(Eval("Team2"), Eval("Score2"), Eval("Wkts2"), False, Eval("Overs2"))% /td td %# TeamGamePoints(Eval("Team2"),Eval("Points2"))% /td /tr /table /ItemTemplate /asp:TemplateField /Columns asp:GridView |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
| |