ASP NET AssignmentGuide ModelValidation
ASP NET AssignmentGuide ModelValidation
Step 1 : Create ASP.NET Application 1.1 From menu File|New Web Site, In Project Type | Visual C# & Templates | ASP.NET Empty Web Site and named MyWebApp , add App_Code folder. 1.2 Right-click on MyWebApp | Add New Item | ADO.NET Entity Data Model , named BookManager.edmx as the below figure .
Page:1
FPT Aptech -
Microsoft Visual Studio dialog showed , click Yes to add model into App_Code .
In Entity Data Model Wizard dialog , select Generate from database , click Next | New Connection , and configure as the below figures :
Page:2
FPT Aptech
Page:3
FPT Aptech
Page:4
FPT Aptech
Step 2 :Create a ASP.NET page 2.1 Add new a ASP.NET MaintainBooks.aspx with interface as the below table: named user
Value
Please check the following errors: fvProductDetail Book Insert fvProductDetail_InsertBook Reference to HTML Code for FormView gvBookList BookID True True gvBookList_GetBooks gvBookList_UpdateBook gvBookList_DeleteBook
FormView
GridView
Page:5
2.2 Right-click on App_Code | Add | Class , named Book.cs and writes code as the following:
Page:6
FPT Aptech
2.3 Double click on the MaintainBooks.aspx page and writes code for MaintainBooks.aspx.cs file as the following :
Step 3 : Run MyWebApp application On the MyWebApp project , select MaintainBooks .aspx , right-click | View in Browser ,
and test functions as the below figure .
Page:7
FPT Aptech
Page:8