In Expression Web 4, it’s a fairly simple process to display data from a database on a web page in a gridview (table). However, without formatting the fields, it’s difficult to distinguish one data field from another, and impossible to click on a link or email address. This article shows you how to format number fields (currency and percentages) and telephone numbers, and make URLs and email addresses clickable in an ASP.Net Gridview using Expression Web 4. Figure 1 shows you a gridview with no fields formatted.
Figure 1 An ASP.NET Gridview with unformatted fields
This article assumes that you have created a website, imported an Access database into it, configured your data source using the AccessDataSource Control, created a Gridview on a web page, and saved the page with an .aspx file extension. The following instructions were created using:
- Expression Web 4
- Microsoft Access 2003
- Microsoft Expression Development Server
- Microsoft .NET Framework 4.0.
- Windows XP Pro SP3