问题
I'm beginner in ASP.Net
.I'm know developing the small project for searching data from DB.
I use ASP.Net web form and ADO.Net.I would like to show the data list like stackoverflow because I don't want to use GridView
.
I've some data fields to show example.
- Title
- Description
- Date
- Keyword
Please check out my screen shoot now I use Literal
for draft.

so Please point to me what control I should use and that control will attach with Pager
for the data list.
Important: Please let me know how to make layout template for the data list (Details)
Thanks
回答1:
You could use a Repeater
http://www.w3schools.com/ASPNET/aspnet_repeater.asp
And if you need to page it
http://www.aspnettutorials.com/tutorials/controls/page-repeater-aspnet2-csharp.aspx
http://www.4guysfromrolla.com/articles/081804-1.aspx
回答2:
It would help if you were a little more specific and explained what you've tried so far.
You can do this without using any control at all if you wish. In this case, you'll need to either create the output string and assign it to a Literal control or simply render it when the page renders by forming the markup directly to the response stream.
If on the other hand, you want to go ahead and use a control for this, a grid control may or may not make the most sense.
来源:https://stackoverflow.com/questions/4710671/stackoverflow-style-data-list-view