I have a table that has information of fire departments around the state. I am trying to set up the gridview so that the address is a hyperlink with google maps. For example, In my address column, I have an address such as 745 W Colfax Ave Denver CO 80204, I want to change it so the DataNavigateUrlFormatString would read "https://maps.google.com/maps?q=" + the address with the spaces replaced with a '+' symbol so it would end up being like this 745 W Colfax Ave Denver CO 80204. Here's my ASP.Net code snippet:
<Columns> <asp:BoundField DataField="resource" HeaderText="Resource" /> <asp:BoundField DataField="name" HeaderText="Name" /> <asp:BoundField DataField="description" HeaderText="Description" /> <asp:BoundField DataField="kind" HeaderText="Kind" /> <asp:BoundField DataField="type" HeaderText="Type" /> <asp:HyperLinkField DataNavigateUrlFields="address" DataNavigateUrlFormatString="https://maps.google.com/maps?q=745+W+Colfax+Ave+Denver+CO+80204" DataTextField="address" HeaderText="Address" /> </Columns>
How do I go about doing this?