Varying DataGrid URLs
Hi all. I have a DataGrid for which the datasource is a DataTable. For each row in the DataGrid, there is a different hyperlink to a pop-up web page.
I have created a hyperlink column in my DataGrid, but don't know how to code it in my code behind to have a different hyperlink for each row/hyperlink column to my pop-up web page.
I bind to my datasource first, then want to set up the different pop-up web page hyperlinks for each row/column.
I was originally using an ASP.Net table, but was asked to use a DataGrid instead. I accomplished it in the ASP.Net table by creating a literal control and a hyperlink control and adding each to the row column. Here's the syntax I used for the hyperlink control attribute:
exph.Attributes.Add("onclick", "javascript:window.open('TchrSubjExpDetail.aspx',' exp','width=820,height=675,resizable=no,left=25,to p=5')")
Now I need to do something similar with my DataGrid.
Any ideas or suggestions would be appreciated.
Thanks,
Sue
|