Thank you Indresh, that was quick and it worked. I tired adding some more fields. I have difficulties with the C# when I tried to compile them all under one button to enter into database.
Can you assist with the default.aspx.cs
Here is my struggle:
Web Config:
<?xml version="1.0"?>
<!--
For more information on how to configure your ASP.NET application, please visit
http://go.microsoft.com/fwlink/?LinkId=169433
-->
<configuration>
<connectionStrings>
<add name="DBConnection" connectionString="Data Source=(localDB)\MSSQLLOCALDB;Initial Catalog=LogData;Integrated Security=True"/>
</connectionStrings>
<system.web>
<compilation debug="true" targetFramework="4.0"/>
</system.web>
</configuration>
Default.aspx
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="default.aspx.cs" Inherits="default " %>
<!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>
</head>
<body>
<form id="form1" runat="server">
<div>
Employee Names:
<br />
<asp:CheckBoxList ID="ListBox1" runat="server" Height="149px" SelectionMode="Multiple"
Width="113px">
<asp:ListItem>Vinz</asp:ListItem>
<asp:ListItem>Jhen</asp:ListItem>
<asp:ListItem>Chris</asp:ListItem>
<asp:ListItem>Shynne</asp:ListItem>
<asp:ListItem>Chu</asp:ListItem>
<asp:ListItem>Mark</asp:ListItem>
<asp:ListItem>Lilian</asp:ListItem>
<asp:ListItem>Rod</asp:ListItem>
<asp:ListItem>Glendzy</asp:ListItem>
</asp:CheckBoxList>
<br />
<br />
Boss Names:
<br />
<asp:CheckBoxList ID="ListBox2" runat="server" Height="149px" SelectionMode="Multiple"
Width="113px">
<asp:ListItem>Smith</asp:ListItem>
<asp:ListItem>Wilson</asp:ListItem>
<asp:ListItem>Bernaud</asp:ListItem>
</asp:CheckBoxList>
</div>
<br />
Employee number:
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
<br />
<br />
Date joined (month/year)
<asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>
<br />
<br />
<br />
<strong>Employee Personal Data
<br />
<br />
</strong>Street Address
<asp:TextBox ID="TextBox3" runat="server"></asp:TextBox>
<br />
<br />
city (choose from dropdown)
<asp:TextBox ID="TextBox4" runat="server"></asp:TextBox>
<br />
<br />
province = Ontario (default)<br />
<br />
postal code
<asp:TextBox ID="TextBox5" runat="server"></asp:TextBox>
<br />
<br />
phone number
<asp:TextBox ID="TextBox7" runat="server"></asp:TextBox><br />
<br />
<asp:Button ID="Button1" runat="server" Text="Save" OnClick="Button1_Click" />
<br />
</form>
</body>
</html>
Thanks
Asif