Sunset at Oak Island, North Carolina

Spider Web Woman Designs

How to make an email address clickable in an ASP.NET GridView

In Design View, click in the GridView and click on the arrow pointing to the right. You should see Common GridView Tasks.

Choose Add New Column.

This should bring up the Add Field dialog

Select HyperLinkField as the field type.

Type the text you want to appear as your column header in the Header Text field.

For Hyperlink text, choose Get text from data field and select your email address fieldname from the dropdown.

For Hyperlink URL, choose Get URL from data field and select your field from the dropdown.

In the URL format string field, type mailto:{0}

Click the "Convert this field into a TemplateField" link.

Click OK.

In Design View, the field should be displayed as a clickable field called Databound.

Save your page and preview in browser.

Back to Working with Access Databases in Microsoft Expression Web


Email UsWe're on Google+LinkedIn ProfileFollow us on TwitterLike Us on Facebook!