Introduction to the ADO.NET Entity Framework using ASP.NET - CRUD operations using ADO.NET Entity Framework: Screen Design
(Page 2 of 5 )
Let us add a new form (CRUD.aspx) to our project so that we can have a demonstration of CRUD operations using ADO.NET Entity Framework, using ASP.NET as client.
Modify CRUD.aspx so that it looks like this:
<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="CRUD.aspx.vb" Inherits="Sample01.CRUD" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
<table cellpadding="2" cellspacing="2">
<tr>
<td>
<asp:Label ID="Label1" runat="server" Text="Empno:"></asp:Label>
</td>
<td>
<asp:TextBox ID="txtEmpno" runat="server"></asp:TextBox>
</td>
<td align="left">
<asp:Button ID="btnSearch" runat="server" Text="Search" />
</td>
</tr>
<tr>
<td>
<asp:Label ID="Label2" runat="server" Text="Ename:"></asp:Label>
</td>
<td>
<asp:TextBox ID="txtEname" runat="server"></asp:TextBox>
</td>
</tr>
<tr>
<td>
<asp:Label ID="Label3" runat="server" Text="Sal:"></asp:Label>
</td>
<td>
<asp:TextBox ID="txtSal" runat="server"></asp:TextBox>
</td>
</tr>
<tr>
<td>
<asp:Label ID="Label4" runat="server" Text="Deptno:"></asp:Label>
</td>
<td>
<asp:TextBox ID="txtDeptno" runat="server"></asp:TextBox>
</td>
</tr>
<tr>
<td colspan="3">
<table cellpadding="3" cellspacing="0">
<tr>
<td>
<asp:Button ID="btnClear" runat="server" Text="Clear" /></td>
<td>
<asp:Button ID="btnAdd" runat="server" Text="Add" /></td>
<td>
<asp:Button ID="btnUpdate" runat="server" Text="Update" /></td>
<td>
<asp:Button ID="btnDelete" runat="server" Text="Delete" /></td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="3">
<asp:Label ID="lblMsg" runat="server"></asp:Label>
</td>
</tr>
</table>
</div>
</form>
</body>
</html>
Once the above form gets executed, it should look like the following (Fig 05):

Next: CRUD operations using ADO.NET Entity Framework: Source Code >>
More ASP.NET Articles
More By Jagadish Chaterjee