Custom Search

Monday, August 4, 2008

Using the FormView Control

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:

Free Traffic

 Join My Community at MyBloglog! Blog Flux Directory 

Web Developement Blogs - BlogCatalog Blog Directory web development blog  Internet Blogs - Blog Top Sites 

Blog Directory 

Click Here for Free Traffic!

Link2Communion.com