Beginning LINQ to SQL Using Visual Studio 2008 - CRUD operations using the LINQ to SQL application (without LINQ designer): UI Design
(Page 4 of 6 )
Add a new web form (aspx) to the project named "CRUDSample.aspx" and modify the user interface to look like the following (Fig 05):

The following is the code to design the above user interface:
<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="CRUDSample.aspx.vb" Inherits="SampleVB.CRUDSample" %>
<!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 id="Head1" runat="server">
<title>Untitled Page</title>
<style type="text/css">
.style1
{
width: 100%;
}
</style>
</head>
<body>
<form id="form1" runat="server">
<div>
<table class="style1">
<tr>
<td valign="top">
<table class="style1">
<tr>
<td>
<asp:Label ID="Label1" runat="server" Text="Empno:"></asp:Label>
</td>
<td>
<asp:TextBox ID="txtEmpno" runat="server"></asp:TextBox>
<asp:Button ID="btnSearch" runat="server" Text="->" />
</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>
</table>
<asp:Button ID="btnInsert" runat="server" Text="Add New" />
<asp:Button ID="btnUpdate" runat="server" Text="Update" />
<asp:Button ID="btnDelete" runat="server" Text="Delete" /><br />
<asp:Label ID="lblMsg" runat="server" ForeColor="Maroon"></asp:Label>
</td>
<td valign="top">
<asp:Button ID="btnSelectStar" runat="server" Text="SELECT *" />
<asp:GridView ID="GridView1" runat="server">
</asp:GridView>
</td>
</tr>
</table>
</div>
</form>
</body>
</html>
Next: CRUD operations using the LINQ to SQL application (without LINQ designer): Source in VB.NET >>
More .NET Articles
More By Jagadish Chaterjee