Last post Mar 31, 2011 10:25 PM by Decker Dong - MSFT
Mar 29, 2011 06:48 PM|sbinyamin|LINK
I am using Visual Studio 2010 with Access database. The customer table has 2 columns, Names and Emails. I want to
display and bind the data for all of the names from the customer table in a bulleted list. (Extra work)
Then I want to make each name link to their corresponding email address.
How can I do it? Can I use GridView or SqlDataSource?
Mar 29, 2011 09:03 PM|limno|LINK
You can use a GridView to present your Names in a HyperLinkField or a hyperlink in a templatefield to show the names as text and the link to the Emails.
You can use AccessDataSource as your datasource instead of SqlDataSource.
Mar 30, 2011 09:35 AM|hans_v|LINK
Can I use GridView or SqlDataSource?
Off course, but why not use the bulletedList control instead of a gridview?
Mar 30, 2011 09:38 AM|hans_v|LINK
You can use AccessDataSource as your datasource instead of SqlDataSource
An AccessDatasource is just a modified SqlDataSource control. If the database is password proteced or he's using a accdb file, the AccessDatasource cannot be used. And with the SqlDatasource, it is easier to move or rename the database without needing to
change many pages, so I think the SqlSatasource is the better option...
Mar 31, 2011 10:25 PM|Decker Dong - MSFT|LINK
Try what hans_v says and use BulltedList Data Control is your best choice.
And anyway, if you insist using Something like GridView……
I recommand you to use Repeater, because you can define which (styles) you will show to the public in the ItemTemplate, HeaderTemplate or FooterTemplate.