Home > DeveloperSection > Forums > Redirect to specific page when a gridview buttonfield is clicked
Manoj Bhatt
Manoj Bhatt

Total Post:154

Posted on    September-05-2014 12:27 AM

 ASP.Net ASP.Net 

 1 Reply(s)
 1354  View(s)
Rate this:

I have two fields in my gridview. One is a field with a date range and one of them is a buttonfield. I want to make it so that when a button is clicked, it will redirect them to a specific page with a formatted string similar to how it's done when a hyperlinkfield is clicked as such:


Is there a way I can do the same thing with a button?

Sumit Kesarwani

Total Post:378

Posted on    September-05-2014 1:06 AM

Hi Manoj, 

Try using this type of column instead of a ButtonField:




     HeaderText="Product Name"



     DataNavigateUrlFormatString="ProductInfo.aspx?ProductID={0}" />


Don't want to miss updates? Please click the below button!

Follow MindStick