Can someone please let me know why the code below is not updating to the db? I will post my asp code first then the code-behind in a follow-on post...
HTML:
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="details.aspx.vb" Inherits="details" %>
<!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>Update an Employee</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:DetailsView ID="dvDetails" runat="server" AutoGenerateRows="False" Height="50px"
Width="125px" DefaultMode="Edit">
<Fields>
<asp:BoundField DataField="EmployeeID" Visible="false" />
<asp:BoundField DataField="LastName" HeaderText="LastName" SortExpression="LastName" />
<asp:BoundField DataField="FirstName" HeaderText="FirstName" SortExpression="FirstName" />
<asp:BoundField DataField="Title" HeaderText="Title" SortExpression="Title" />
<asp:BoundField DataField="Address" HeaderText="Address" SortExpression="Address" />
<asp:BoundField DataField="City" HeaderText="City" SortExpression="City" />
<asp:BoundField DataField="Region" HeaderText="Region" SortExpression="Region" />
<asp:BoundField DataField="PostalCode" HeaderText="PostalCode" SortExpression="PostalCode" />
<asp:BoundField DataField="HireDate" HeaderText="HireDate" SortExpression="HireDate" />
</Fields>
</asp:DetailsView>
</div>
<asp:Button ID="update" runat="server" Text="Update" />
<asp:Button ID="cancel" runat="server" Text="Cancel" />
<asp:SqlDataSource ID="SqlDataSource1" runat="server"></asp:SqlDataSource>
</form> </body>
</html>
Last edited by a moderator: