Suggestions on how to Open a New Window from a data grid

G

Guest

I have a datagrid that holds a whole list of records about computers. I need one column that is a hyperlink that when clicked will show the details of that computer model. The hyper link needs to open in a new window and have an address that is my page name (modelinfo.aspx). That part is easy, as this is built into the datagrid control. But the last thing I need is a varible on it, so when the hyperlink is clicked, a New page would open and have an address "modelinfo.aspx?Model=" & what ever value is in the corresponding cell that was clicked. So if I clicked on Model "e20" the address bar would have to read "modelinfo.aspx?Model=e20" etc. Any suggestions? Thank

Bill
 
A

avnrao

try this in the datagrid..

<asp:HyperLink runat="server" Target=_blank Text='<%#
DataBinder.Eval(Container, "DataItem.Model") %>' NavigateUrl='<%#
DataBinder.Eval(Container, "DataItem.Model", "modelinfo.aspx?Model={0}")
%>'></asp:HyperLink>

Av.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top