What is the purpose of detailsview control and how does it relate to templatefield?

Bob Dang 1 Reputation point

What is the purpose of detailsview control and how does it relate to templatefield?

A set of technologies in the .NET Framework for building web applications and XML web services.
1,490 questions
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
8,243 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Yijing Sun-MSFT 7,031 Reputation points

    Hi @Bob Dang ,
    The DetailView is a data control. Of course the purpose is to show the data from the data source. You could try to bind the source to see the layout. It only show one single record. When you bind the datafield, there are two ways: one is using BoundField. Because the detailview have the table layout, you only bind the DataField on the BoundField. Another way is using the templatedfiled. You could create the template by yourself. I suggest you could learn this article.

    Best regards,
    Yijing Sun

    If the answer is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our  documentation  to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

  2. Bob Dang 1 Reputation point


    What is a data control in the highlighted image? What do you mean by it only shows one single record in the highlighted part of the image, since I thought that it can show many records? What do you mean by you can only bind the datafield on boundfield?

    Thanks for your help.