After I discuss about DetailsView in my latest post, now I will discuss about FormView Control. You can use the FormView control to do anything that you can do with the DetailsView control. Just as you can with the DetailsView control, you can use the FormView control to display, page, edit, insert, and delete database records. However, unlike the DetailsView control, the FormView control is entirely template driven. The FormView control provides you with more control over the layout of a form. Furthermore, adding validation controls to a FormView is easier than adding validation controls to a DetailsView control.
Example :
< asp:FormView >
id="frmStd"
DataSourceID="srcStd"
Runat="server" >
(ItemTemplate)
(h1)< %# Eval("name") % >< /h1 >
(b)Address :< /b >
< %# Eval("address") % >
(br)
(b)Age :< /b >
< %#Eval("age") % >
< /ItemTemplate >
< /asp:FormView >
No comments:
Post a Comment