The following example demonstrates how to use a FormView control to display the values from a SqlDataSource control.
Visual Basic
<%@ Page language="VB" %>
FormView Example
C#
<%@ Page language="C#" %>
FormView Example
The following example demonstrates how to use a FormView control to edit existing records.
Security Note:
The control in this example has a text box that accepts user input, which is a potential security threat. By default, ASP.NET Web pages validate that user input does not include script or HTML elements. For more information, see Script Exploits Overview.
Visual Basic
<%@ Page language="VB" %>
FormView Example
C#
<%@ Page language="C#" %>
FormView Example
The following example demonstrates how to use a FormView control to insert new records.
Security Note:
The control in this example has a text box that accepts user input, which is a potential security threat. By default, ASP.NET Web pages validate that user input does not include script or HTML elements. For more information, see Script Exploits Overview.
Visual Basic
<%@ Page language="VB" %>
FormView InsertItemTemplate Example