just bind a grid view to ur db table with details u want along with a column 'View' having id of race.
run a loop which will create a new imagebutton with id as that of race id and add a click event handler to these buttons with same method to be called.
ex:
for(int i=0;i<gvRace.rows.count;i++)
{
imagebutton imb=new imagebutton();
imb.id=gvRace.rows[i].cell[0].text;//or value
imb.imageUrl="";//any image u like
imb.click+=new eventhandler(imb_click);
gvRace.Rows[i].cell[0].controls.add(imb);
}
and in the click event just find the imagebutton id which is actually ur race id and pass it to next page via query string or session
protected void imb_click(object sender,ImageButtonEventAgrs e)
{
control imb=(control)sender;
server.transfer("raceDetail.aspx?rid="+imb.id);
}
|