It is the Edit Item Template you are interested in.
The Edit Item Template will contain Text Box controls by default.
To demonstrate data binding for a Drop Down List in a Form View switch the Form View to the Edit Item Template.
You can use the Smart tags menu or switch to the ASP.
Bind and Eval perform approximately the same function, reading data from a data source. Selected Value End Sub Use Bind for the Drop Down List Selected Value and the code in Listing 1 is not needed. Modify the Customer ID by picking a Customer from the Drop Down List and click the Update button provided by the Form View designer.
The difference is that Bind is a two-way bind (read and write) and Eval is a one way bind (read-only) from the Data Source. Item Updating Dim control As Drop Down List = Form View1. If you use Eval then remember that the Drop Down List is in a template of the Form View, so you have to get the actual Drop Down List by calling Find Control and setting the updated value to the e. The running form is shown in Figure 3, and the ASP.
The Data Value Field and Data Text Field's are assigned to Customer ID and Company Name respectively, and lookup values will come from the Customers table.
The Drop Down List should be configured to look like the ASP. The Data Source ID for the Drop Down List points at Customer IDData Source.
Protected Sub Form View1_Item Updating(By Val sender As Object, _ By Val e As System. The key to binding is the second Data Source for the lookup and understanding the difference between Bind and Eval.
Bind reads and writes and Eval only reads from the Data Source.
For example, the Grid View control is just a smarter version of the Data Grid control that, among other little things, fully supports the new data binding model. NET, for iterating data templates for all the records in a data source. NET provides Repeater and Data List controls, but they only support data source components for fetching.
Designed to render tabular data, the Grid View is partnered by Details View and Form View that render out the content of a single record at a time. NET 3.5, the family of “view” data-bound controls has a new addition – the List View control. The List View control can be considered as an enhanced version of the Data List control that fully supports data source components.
NET view and replace the Customer ID Text Box with a Drop Down List.