0% found this document useful (0 votes)
8 views9 pages

Formview

DetailView and FormView controls are used for displaying single records in a master-detail scenario, with DetailView presenting data in a tabular format and FormView allowing for customizable templates. Both controls support editing, inserting, deleting, and paging functionality, but FormView simplifies adding validation controls. The document also explains the difference between Eval and Bind functions for data binding in DataBound controls.

Uploaded by

achu48547
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views9 pages

Formview

DetailView and FormView controls are used for displaying single records in a master-detail scenario, with DetailView presenting data in a tabular format and FormView allowing for customizable templates. Both controls support editing, inserting, deleting, and paging functionality, but FormView simplifies adding validation controls. The document also explains the difference between Eval and Bind functions for data binding in DataBound controls.

Uploaded by

achu48547
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

DETAILS VIEW CONTROL

DetailView is one of the important control, that is mainly used in master-


detail scenario. You select the record from master control (as example
GridView) and selected record is displayed in DetailView control.

In general GridView control displays more than one record, but the
DetailsView control displays single record from database table. When you
execute your web page, DetailsView control renders an HTML table.
DetailsView control supports the edit, insert, delete and paging functionality.

It is designed to display data for a single item from a datasource.

The working of FormView control is same as DetailView control but the


default UI of FormView control is different. DetailView control displays the
records in tabular format. FormView control does not have predefined layout
but it depend upon template. According to the need of application, you can
display the data with the help of template.

You can insert, update, delete and paging the record in FormView. Adding
validation controls to a FormView is easier than DetailView control. For
displaying data, ItemTemplate is used.
Eval vs bind
The difference between Eval and Bind is that Eval function is used to bind data to control inside a DataBound
control, but it cannot update the values back to the database.
<asp:TextBox ID="txtName" runat="server" Text='<%# Eval("Name") %>'
/>
On the other hand, Bind function can be used to bind data to control inside a DataBound control and also it can
update the values back to the database.
<asp:TextBox ID="txtName" runat="server" Text='<%# Bind("Name") %>'
/>
Edit item template , insert item template

This control specifies data in a row and coloumn format just like gridview control.
The main difference is that the list view control includes an additional row for inserting a new row
into the table.
PAGING FOR LIST VIEW CONTROL
HOW TO CUSTOMIZE PAGING
HOW TO GROUP DATA IN LIST VIEW

You might also like