embedding <a href > tag in DataGrid

O

OutlookNewbieDev

Hello,

I'm new to ASP.NET but have done quite a bit of classic ASP. I need to
drill down to another page from the DataGrid using a record's ID. In classic
ASP, this was quite easy but I can't find anything equivalent in ASP.NET.

For example, I need to go from a page that lists Customers to a page for
CustomerDetails by allowing the user to click anywhere on the row of the
DataGrid.

I've read about using a TemplateColumn and a lable but it doesn't look like
the same functionality. Any help is very much appreciated.

Regards,

ASP.NET Newbie
 
C

Cathal Connolly [VB MVP]

The best option is probably a HyperLinkColumn e.g.

<asp:HyperLinkColumn DataTextField="idfromdatabase" HeaderText="Customers"
DataNavigateUrlField="idfromdatabase"
DataNavigateUrlFormatString="customers.aspx?path={0}">
</asp:HyperLinkColumn>

Cathal
 

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

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,575
Members
45,053
Latest member
billing-software

Latest Threads

Top