going to a Google map

Discussion in 'Databases' started by allenfr, Apr 19, 2009.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. In a database of town roads, I have columns for the usual roadname, surface, length,maintenance, etc. I have one column that is the Google link for that particular road map. I would like to use a button in each gridview record that calls that Google link. I see there are both buttonfield and hyperlink available in gridview. I would prefer to use a button to call the Google link in a map column.

    Perhaps I'm just in way over my head for an old fart. But, it seems everytime I beat my head enough, it turns out to be a one or two line solution.

    I'm using C#, and a gridview on a webform in VWD.
     
  2. The ButtonField class information is here along with a code sample of how to use a buttonField column: http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.buttonfield.aspx

    The trick in your case will be to intercept the GridView RowCommand event (Occurs when a button is clicked in a GridView control) and then obtain the relevant Google Map URL for the selected row so you can do a Response.Redirect (or maybe something like a redirect..)
     
Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.

Share This Page