ASP.NET DataList for a single item
Context: In an ASP.NET application, I 开发者_开发知识库need the behavior of the ItemTemplate / EditItemTemplate that the DataList control provides. However, I only need one item in my control, which makes the DataList seems like overkill.
Question: Is there a control in ASP.NET made to store a single item that has the template content behavior of the DataList and DataGrid? Should I use a DataList for only one item?
Why don't you use the FormView or DetailsView? They are meant to display one item (at the time).
精彩评论