---
title: "Using routes in ASP.NET Gridview Hyperlinks"  
description: "Using routes in ASP.NET Gridview Hyperlinks"  
author: "Manoj Bhatt"  
published: 2014-08-23  
updated: 2014-08-23  
canonical: https://www.mindstick.com/forum/2105/using-routes-in-asp-dot-net-gridview-hyperlinks  
category: "asp.net"  
tags: ["asp.net"]  
reading_time: 1 minute  

---

# Using routes in ASP.NET Gridview Hyperlinks

I have a [Gridview](https://www.mindstick.com/articles/873/update-delete-edit-gridview-in-asp-dot-net) with a Hyperlink column. I want to [route](https://www.mindstick.com/interview/396/what-is-routed-event-in-wpf)(Navigate) using hyperlinks depending on the id [value](https://www.mindstick.com/articles/23219/an-optimized-description-adds-value-to-experience-and-in-turn-effectively-guest-posting-packages) from the database.

```
<asp:HyperLinkField DataNavigateUrlFields="id"                      
DataNavigateUrlFormatString="product"DataTextField="pName"                      
HeaderText="Product Name"      
NavigateUrl='<%$ RouteUrl:id=Eval("id"), routename =
ProductRoute%>'        />
```

**This [results](https://yourviews.mindstick.com/story/4497/usage-of-baking-soda-magical-results) in an [error message](https://www.mindstick.com/forum/23174/error-message-the-page-you-are-requesting-cannot-be-served-because-of-the-extension-configuration):**

404 [page not found](https://www.mindstick.com/articles/1498/custom-error-page-in-asp-dot-net-mvc-4)

How can this be fixed?

## Replies

### Reply by Sumit Kesarwani

Hi manoj, \

Try creating the link in the RowDataBound event handler in your code-behind and debug it there.


---

Original Source: https://www.mindstick.com/forum/2105/using-routes-in-asp-dot-net-gridview-hyperlinks

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
