We use stored procedures for data access, if you're not comfortable with that you'll want to change that.As with all our code, this is a 'minimum needed to get it working example.
We (the page developer) are responsible for specifying the precise HTML rendered for the List View control.
This markup is specified through the List View's 11 templates: The two key templates are the Layout Template and Item Template.
I think what you have should work ok, provided the Form View has data and it has been data-bound.
Find Control(..) will probably return null if there is no data.
This article, the first in a series of articles on the List View and Data Pager controls, looks at the List View's many available templates and illustrates how to display data. While page developers can use Template Fields and other tools to tweak the appearance of a Grid View, the Grid View's output will still be encased within a .
The List View control, on the other hand, does not encase its rendered output with any additional markup.
Check any information that is sent from a client for executable script, SQL statements, or other code before displaying it in your application. NET provides an input request validation feature to block script and HTML in user input.
Use one of the following methods to bind the Details View control to the appropriate data source type: For more information on data binding, see ASP. This control can be used to display user input, which might include malicious client script.
The Details View control provides built-in capabilities that allow the user to update, delete, insert, and page through items in the control. In edit mode, the Edit button is replaced with an Update and a Cancel button.
For more information, see Validation Server Controls. The Details View control can automatically add a Command Field row field with an Edit, Delete, or New button by setting the Details View. Unlike the Delete button (which deletes the selected record immediately), when the Edit or New button is clicked, the Details View control goes into edit or insert mode, respectively.
I'll post the ASP code, hopefully someone can help me with this one.