hyperlink in datagrid

Posted on 2004-09-03
Medium Priority
Last Modified: 2010-04-23

   I want to use a hyperlink column in datagrid. I know i have to use template column for this. Clicking on this link should redirect to another page along with one parameter in query string.

wht is the exact code for this.

Question by:sandeep437
LVL 37

Accepted Solution

gregoryyoung earned 80 total points
ID: 11976418
       <asp:TemplateColumn HeaderText="au_fname" SortExpression="au_fname">
            <asp:NavigateUrl runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "somefield") %>' NavigateUrl='yoururlstring?param=<%# DataBinder.Eval(Container.DataItem, "someotherfield") %>'/>


Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you're writing a .NET application to connect to an Access .mdb database and use pre-existing queries that require parameters, you've come to the right place! Let's say the pre-existing query(qryCust) in Access takes a Date as a parameter and l…
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
Enter Foreign and Special Characters Enter characters you can't find on a keyboard using its ASCII code ... and learn how to make a handy reference for yourself using Excel ~ Use these codes in any Windows application! ... whether it is a Micr…
How to fix display issue, screen flickering issue when I plug in power cord to the machine. Before I start explaining the solution lets check out once the issue how it looks like after I connect the power cord. most of you also have faced this…
Suggested Courses
Course of the Month5 days, 1 hour left to enroll

601 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question