Hi
I have a page with 2 datagrids on it. The Second one is one that is
displays one column. The problem I have is how to update the information
entered in the second dataagrid.
Here's my code
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using System.Data.OleDb;
using System.Web.Security;
using System.Configuration;
namespace kool.adminis
{
/// <summary>
/// Summary description for user.
/// </summary>
public class user : System.Web.UI.Page
{
protected System.Web.UI.WebControls.DataGrid dgUsers;
protected System.Web.UI.WebControls.Label lblMsg;
protected System.Data.OleDb.OleDbCommand oleDbSelectCommand1;
protected System.Data.OleDb.OleDbCommand oleDbInsertCommand1;
protected System.Data.OleDb.OleDbCommand oleDbUpdateCommand1;
protected System.Data.OleDb.OleDbCommand oleDbDeleteCommand1;
protected System.Data.OleDb.OleDbConnection kkConn1;
protected System.Data.OleDb.OleDbDataAdapter daUsers;
protected System.Data.DataSet dsUsers;
protected System.Data.OleDb.OleDbCommand cmdDelUser;
protected System.Data.OleDb.OleDbCommand cmdSelUser;
protected System.Data.DataSet dsUser;
protected System.Data.OleDb.OleDbCommand oleDbInsertCommand2;
protected System.Data.OleDb.OleDbDataAdapter daUser;
protected System.Data.OleDb.OleDbCommand cmdUpdUser;
protected System.Web.UI.WebControls.DataGrid dgUser;
private void Page_Load(object sender, System.EventArgs e)
{
if (! IsPostBack)
{
kkConn1.Open();
daUsers.Fill(dsUsers);
Cache ["UserData"] = dsUsers;
dgUsers.DataSource= dsUsers;
bindGrid();
kkConn1.Close();
}
}
private void bindGrid()
{
dsUsers = (DataSet)Cache ["UserData"];
dgUsers.DataBind();
}
private void bindDetails()
{
dsUser = (DataSet)Cache["User"];
dgUser.DataBind();
}
#region Web Form Designer generated code
override protected void OnInit(EventArgs e)
{
//
// CODEGEN: This call is required by the ASP.NET Web Form Designer.
//
InitializeComponent();
base.OnInit(e);
}
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.Configuration.AppSettingsReader configurationAppSettings = new
System.Configuration.AppSettingsReader();
this.oleDbSelectCommand1 = new System.Data.OleDb.OleDbCommand();
this.kkConn1 = new System.Data.OleDb.OleDbConnection();
this.oleDbInsertCommand1 = new System.Data.OleDb.OleDbCommand();
this.oleDbUpdateCommand1 = new System.Data.OleDb.OleDbCommand();
this.oleDbDeleteCommand1 = new System.Data.OleDb.OleDbCommand();
this.daUsers = new System.Data.OleDb.OleDbDataAdapter();
this.dsUsers = new System.Data.DataSet();
this.cmdDelUser = new System.Data.OleDb.OleDbCommand();
this.cmdSelUser = new System.Data.OleDb.OleDbCommand();
this.dsUser = new System.Data.DataSet();
this.daUser = new System.Data.OleDb.OleDbDataAdapter();
this.oleDbInsertCommand2 = new System.Data.OleDb.OleDbCommand();
this.cmdUpdUser = new System.Data.OleDb.OleDbCommand();
((System.ComponentModel.ISupportInitialize)(this.dsUsers)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.dsUser)).BeginInit();
this.dgUser.CancelCommand += new
System.Web.UI.WebControls.DataGridCommandEventHandler(this.cancelEditUser);
this.dgUser.EditCommand += new
System.Web.UI.WebControls.DataGridCommandEventHandler(this.editUser);
this.dgUser.UpdateCommand += new
System.Web.UI.WebControls.DataGridCommandEventHandler(this.updateUser);
this.dgUsers.ItemCommand += new
System.Web.UI.WebControls.DataGridCommandEventHandler(this.detailUser);
this.dgUsers.PageIndexChanged += new
System.Web.UI.WebControls.DataGridPageChangedEventHandler(this.pageChange);
this.dgUsers.SortCommand += new
System.Web.UI.WebControls.DataGridSortCommandEventHandler(this.sortUsers);
this.dgUsers.DeleteCommand += new
System.Web.UI.WebControls.DataGridCommandEventHandler(this.delUser);
//
// oleDbSelectCommand1
//
this.oleDbSelectCommand1.CommandText = "SELECT Adres, Bank, BTW, email,
Fax,
Gemeente, GSM, ID, Land, Naam, Postcode, rem" +
"arks, Tel, typeb, wachtwoord, webpage FROM Users";
this.oleDbSelectCommand1.Connection = this.kkConn1;
//
// kkConn1
//
this.kkConn1.ConnectionString
((string)(configurationAppSettings.GetValue("kkConn", typeof(string))));
// daUsers
//
this.daUsers.SelectCommand = this.oleDbSelectCommand1;
this.daUsers.TableMappings.AddRange(new
System.Data.Common.DataTableMapping[] {
new System.Data.Common.DataTableMapping("Table", "Users", new
System.Data.Common.DataColumnMapping[] {
new System.Data.Common.DataColumnMapping("Adres", "Adres"),
new System.Data.Common.DataColumnMapping("Bank", "Bank"),
new System.Data.Common.DataColumnMapping("BTW", "BTW"),
new System.Data.Common.DataColumnMapping("email", "email"),
new System.Data.Common.DataColumnMapping("Fax", "Fax"),
new System.Data.Common.DataColumnMapping("Gemeente", "Gemeente"),
new System.Data.Common.DataColumnMapping("GSM", "GSM"),
new System.Data.Common.DataColumnMapping("ID", "ID"),
new System.Data.Common.DataColumnMapping("Land", "Land"),
new System.Data.Common.DataColumnMapping("Naam", "Naam"),
new System.Data.Common.DataColumnMapping("Postcode", "Postcode"),
new System.Data.Common.DataColumnMapping("remarks", "remarks"),
new System.Data.Common.DataColumnMapping("Tel", "Tel"),
new System.Data.Common.DataColumnMapping("typeb", "typeb"),
new System.Data.Common.DataColumnMapping("wachtwoord", "wachtwoord"),
new System.Data.Common.DataColumnMapping("webpage", "webpage")})});
this.daUsers.UpdateCommand = this.oleDbUpdateCommand1;
//
// dsUsers
//
this.dsUsers.DataSetName = "dsUsers";
this.dsUsers.Locale = new System.Globalization.CultureInfo("nl-BE");
//
// dsUser
//
this.dsUser.DataSetName = "dsUser";
this.dsUser.Locale = new System.Globalization.CultureInfo("nl-BE");
//
// daUser
//
this.daUser.DeleteCommand = this.cmdDelUser;
this.daUser.InsertCommand = this.oleDbInsertCommand2;
this.daUser.SelectCommand = this.cmdSelUser;
this.daUser.TableMappings.AddRange(new System.Data.Common.DataTableMapping
[]
{
new System.Data.Common.DataTableMapping("Table", "Users", new
System.Data.Common.DataColumnMapping[] {
new System.Data.Common.DataColumnMapping("Adres", "Adres"),
new System.Data.Common.DataColumnMapping("Bank", "Bank"),
new System.Data.Common.DataColumnMapping("BTW", "BTW"),
new System.Data.Common.DataColumnMapping("email", "email"),
new System.Data.Common.DataColumnMapping("Fax", "Fax"),
new System.Data.Common.DataColumnMapping("Gemeente", "Gemeente"),
new System.Data.Common.DataColumnMapping("GSM", "GSM"),
new System.Data.Common.DataColumnMapping("ID", "ID"),
new System.Data.Common.DataColumnMapping("Land", "Land"),
new System.Data.Common.DataColumnMapping("Naam", "Naam"),
new System.Data.Common.DataColumnMapping("Postcode", "Postcode"),
new System.Data.Common.DataColumnMapping("remarks", "remarks"),
new System.Data.Common.DataColumnMapping("Tel", "Tel"),
new System.Data.Common.DataColumnMapping("typeb", "typeb"),
new System.Data.Common.DataColumnMapping("wachtwoord", "wachtwoord"),
new System.Data.Common.DataColumnMapping("webpage", "webpage")})});
this.daUser.UpdateCommand = this.cmdUpdUser;
//
// cmdUpdUser
//
this.cmdUpdUser.CommandText = "[spUpdUser2]";
this.cmdUpdUser.CommandType = System.Data.CommandType.StoredProcedure;
this.cmdUpdUser.Connection = this.kkConn1;
this.cmdUpdUser.Parameters.Add(new System.Data.OleDb.OleDbParameter("@ID",
System.Data.OleDb.OleDbType.VarWChar));
this.cmdUpdUser.Parameters.Add(new System.Data.OleDb.OleDbParameter
("@Name",
System.Data.OleDb.OleDbType.VarWChar));
this.cmdUpdUser.Parameters.Add(new
System.Data.OleDb.OleDbParameter("@Adres",
System.Data.OleDb.OleDbType.VarWChar));
this.cmdUpdUser.Parameters.Add(new System.Data.OleDb.OleDbParameter
("@post",
System.Data.OleDb.OleDbType.VarWChar));
this.cmdUpdUser.Parameters.Add(new System.Data.OleDb.OleDbParameter("@gem",
System.Data.OleDb.OleDbType.VarWChar));
this.cmdUpdUser.Parameters.Add(new System.Data.OleDb.OleDbParameter
("@bank",
System.Data.OleDb.OleDbType.VarWChar));
this.cmdUpdUser.Parameters.Add(new System.Data.OleDb.OleDbParameter("@vat",
System.Data.OleDb.OleDbType.VarWChar));
this.cmdUpdUser.Parameters.Add(new System.Data.OleDb.OleDbParameter("@tel",
System.Data.OleDb.OleDbType.VarWChar));
this.cmdUpdUser.Parameters.Add(new System.Data.OleDb.OleDbParameter("@fax",
System.Data.OleDb.OleDbType.VarWChar));
this.cmdUpdUser.Parameters.Add(new System.Data.OleDb.OleDbParameter
("@mobi",
System.Data.OleDb.OleDbType.VarWChar));
this.cmdUpdUser.Parameters.Add(new
System.Data.OleDb.OleDbParameter("@email",
System.Data.OleDb.OleDbType.VarWChar));
this.cmdUpdUser.Parameters.Add(new System.Data.OleDb.OleDbParameter("@web",
System.Data.OleDb.OleDbType.VarWChar));
this.cmdUpdUser.Parameters.Add(new System.Data.OleDb.OleDbParameter
("@rema",
System.Data.OleDb.OleDbType.VarWChar));
this.Load += new System.EventHandler(this.Page_Load);
((System.ComponentModel.ISupportInitialize)(this.dsUsers)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.dsUser)).EndInit();
}
#endregion
private void updateUser(object source,
System.Web.UI.WebControls.DataGridCommandEventArgs e)
{
try
{
lblMsg.Text="";
cmdUpdUser.Parameters["@ID"].Value = e.Item.Cells[0].Text;
cmdUpdUser.Parameters["@Name"].Value
e.Item.FindControl("tbName").ToString();
cmdUpdUser.Parameters["@Adres"].Value
e.Item.FindControl("tbAddress").ToString();
cmdUpdUser.Parameters["@post"].Value
e.Item.FindControl("tbPost").ToString();
cmdUpdUser.Parameters["@gem"].Value
e.Item.FindControl("tbCity").ToString();
cmdUpdUser.Parameters["@bank"].Value
e.Item.FindControl("tbBank").ToString();
cmdUpdUser.Parameters["@vat"].Value
e.Item.FindControl("tbVat").ToString();
cmdUpdUser.Parameters["@tel"].Value
e.Item.FindControl("tbTel").ToString();
cmdUpdUser.Parameters["@fax"].Value
e.Item.FindControl("tbFax").ToString();
cmdUpdUser.Parameters["@email"].Value
e.Item.FindControl("tbEmail").ToString();
cmdUpdUser.Parameters["@web"].Value
e.Item.FindControl("tbWeb").ToString();
cmdUpdUser.Parameters["@rema"].Value
e.Item.FindControl("tbRem").ToString();
cmdUpdUser.Parameters["@mobi"].Value
e.Item.FindControl("tbMob").ToString();
kkConn1.Open();
cmdUpdUser.ExecuteNonQuery();
daUser.Fill(dsUser);
Cache["User"] = dsUser;
dgUser.EditItemIndex = -1;
bindDetails();
kkConn1.Close();
}
catch (Exception ex)
{
lblMsg.Text=ex.Message;
}
}
}
}
<%@ Register TagPrefix="uc1" TagName="footer" Src="../footer.ascx" %>
<%@ Register TagPrefix="uc1" TagName="header2" Src="header2.ascx" %>
<%@ Page language="c#" Codebehind="user.aspx.cs" AutoEventWireup="false"
Inherits="kool.adminis.user" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
<HEAD>
<title>..:: Koolkraft - UserManagement ::..</title>
<meta content="Microsoft Visual Studio .NET 7.1" name="GENERATOR">
<meta content="C#" name="CODE_LANGUAGE">
<meta content="JavaScript" name="vs_defaultClientScript">
<meta content="http://schemas.microsoft.com/intellisense/ie5"
name="vs_targetSchema">
<LINK href="../kkStyles.css" type="text/css" rel="stylesheet">
</HEAD>
<body MS_POSITIONING="GridLayout">
<form id="Form1" method="post" runat="server">
<DIV style="Z-INDEX: 101; LEFT: 1px; WIDTH: 1000px; POSITION: absolute;
TOP: 1px; HEIGHT: 148px"
ms_positioning="GridLayout"><uc1:header2 id="Header21"
runat="server"></uc1:header2></DIV>
<asp:datagrid id="dgUser" style="Z-INDEX: 104; LEFT: 184px; POSITION:
absolute; TOP: 384px" runat="server"
Width="648px" GridLines="None" AutoGenerateColumns="False"
BorderStyle="None" PageSize="1"
AllowPaging="True" DataSource="<%# dsUser %>">
<SelectedItemStyle BorderStyle="None"></SelectedItemStyle>
<EditItemStyle BorderStyle="None"></EditItemStyle>
<AlternatingItemStyle BorderStyle="None"></AlternatingItemStyle>
<ItemStyle BorderStyle="None"></ItemStyle>
<HeaderStyle Wrap="False" Height="0px"></HeaderStyle>
<Columns>
<asp:TemplateColumn>
<ItemTemplate>
<asp:BoundColumn Visible="False" DataField="ID"
HeaderText="ID"></asp:BoundColumn>
<TABLE id="Table1" cellSpacing="5" cellPadding="0" width="624"
border="0">
<TR>
<TD align="center" bgColor="#e3ceab" colSpan="4"><FONT
face="Arial,
Helvetica, sans-serif" color="#604820"
size="4"><STRONG>D</STRONG></FONT><STRONG><FONT size="3">etailed
</FONT></STRONG><FONT color="#604820"
size="4"><STRONG>U</STRONG></FONT><FONT size="3"><STRONG>ser</STRONG>
<FONT color="#604820" size="4"><STRONG>I</FONT><FONT
size="3"><STRONG>nformation</STRONG></FONT></STRONG></FONT></FONT></TD>
</TR>
<TR>
<TD style="WIDTH: 132px" align="right">Name :
</TD>
<TD style="WIDTH: 294px">
<asp:Label id=lblName runat="server" Font-Bold="True" Text='<%#
DataBinder.Eval(Container.DataItem,"Naam") %>'>
</asp:Label></TD>
<TD style="WIDTH: 98px" align="right">Telephone :</TD>
<TD>
<asp:Label id=lblTel runat="server" Font-Bold="True" Text='<%#
DataBinder.Eval(Container.DataItem,"Tel") %>'>
</asp:Label></TD>
</TR>
<TR>
<TD style="WIDTH: 132px; HEIGHT: 16px" align="right">Address :
</TD>
<TD style="WIDTH: 294px; HEIGHT: 16px">
<asp:Label id=lblAddress runat="server" Font-Bold="True" Text='<%
#
DataBinder.Eval(Container.DataItem,"Adres") %>'>
</asp:Label></TD>
<TD style="WIDTH: 98px; HEIGHT: 16px" align="right">Fax :</TD>
<TD style="HEIGHT: 16px">
<asp:Label id=lblFax runat="server" Font-Bold="True" Text='<%#
DataBinder.Eval(Container.DataItem,"Fax") %>'>
</asp:Label></TD>
</TR>
<TR>
<TD style="WIDTH: 132px" align="right">Zip and City :</TD>
<TD style="WIDTH: 294px">
<asp:Label id=lblPost runat="server" Font-Bold="True" Text='<%#
DataBinder.Eval(Container, "DataItem.Postcode") %>'>
</asp:Label>
<asp:Label id=lblCity runat="server" Font-Bold="True" Text='<%#
DataBinder.Eval(Container.DataItem,"Gemeente") %>'>
</asp:Label></TD>
<TD style="WIDTH: 98px" align="right">Mobile :</TD>
<TD>
<asp:Label id=lblMob runat="server" Font-Bold="True" Text='<%#
DataBinder.Eval(Container, "DataItem.GSM") %>'>
</asp:Label></TD>
</TR>
<TR>
<TD style="WIDTH: 132px" align="right">BankAccount :</TD>
<TD style="WIDTH: 294px">
<asp:Label id=lblBank runat="server" Font-Bold="True" Text='<%#
DataBinder.Eval(Container.DataItem,"Bank") %>'>
</asp:Label></TD>
<TD style="WIDTH: 98px" align="right">E.mail :</TD>
<TD>
<asp:HyperLink id=hlEmail runat="server" Text='<%#
DataBinder.Eval(Container, "DataItem.email") %>' NavigateUrl='<%# "mailto:"
+ DataBinder.Eval(Container, "DataItem.email")%>'>
</asp:HyperLink></TD>
</TR>
<TR>
<TD style="WIDTH: 132px" align="right">VAT-Number :</TD>
<TD style="WIDTH: 294px">
<asp:Label id=lblVat runat="server" Font-Bold="True" Text='<%#
DataBinder.Eval(Container.DataItem,"BTW") %>'>
</asp:Label></TD>
<TD style="WIDTH: 98px" align="right">WebPage :</TD>
<TD>
<asp:HyperLink id=hlWeb runat="server" Text='<%#
DataBinder.Eval(Container, "DataItem.webpage") %>' NavigateUrl='<%#
DataBinder.Eval(Container, "DataItem.webpage") %>'>
</asp:HyperLink></TD>
</TR>
<TR>
<TD style="HEIGHT: 17px" align="center" bgColor="#e3ceab"
colSpan="4" height="17">
<asp:label id="Label1" runat="server"
BackColor="#E3CEAB"></asp:label></TD>
</TR>
<TR>
<TD style="WIDTH: 132px; HEIGHT: 17px" align="right"></TD>
<TD style="WIDTH: 294px; HEIGHT: 17px">
<asp:Label id="Label2" runat="server">Label</asp:Label></TD>
<TD style="WIDTH: 98px; HEIGHT: 17px" align="right">Remarks :</TD>
<TD style="HEIGHT: 82px" rowSpan="3">
<asp:Label id=lblRem runat="server" Width="158px" Height="78px"
Text='<%# DataBinder.Eval(Container, "DataItem.remarks") %>'>
</asp:Label></TD>
</TR>
<TR>
<TD style="WIDTH: 132px" align="right"></TD>
<TD style="WIDTH: 294px"></TD>
<TD style="WIDTH: 98px" align="right"></TD>
<TD rowSpan="3"></TD>
</TR>
<TR>
<TD style="WIDTH: 132px; HEIGHT: 36px" align="right"></TD>
<TD style="WIDTH: 294px; HEIGHT: 36px"></TD>
<TD style="WIDTH: 98px; HEIGHT: 36px"></TD>
</TR>
<TR>
<TD align="right" colSpan="4">
<asp:button id="btEdit" tabIndex="17" runat="server"
Font-Bold="true" Text="Edit User" BackColor="#604820"
CommandName="Edit" ToolTip="Click to edit user"
BorderColor="#C89F5A" ForeColor="#E3CEAB"></asp:button></TD>
</TR>
</TABLE>
</ItemTemplate>
<EditItemTemplate>
<asp:BoundColumn Visible="False" DataField="ID"
HeaderText="ID"></asp:BoundColumn>
<TABLE id="Table2" cellSpacing="5" cellPadding="0" width="624"
border="0">
<TR>
<TD align="center" bgColor="#e3ceab" colSpan="4"><FONT
size="3"><STRONG><FONT face="Arial, Helvetica, sans-serif" color="#604820"
size="4"><STRONG>E</STRONG></FONT><STRONG><FONT size="3">dit
</FONT></STRONG><FONT color="#604820"
size="4"><STRONG>U</STRONG></FONT><FONT size="3"><STRONG>ser</STRONG>
<FONT color="#604820" size="4"><STRONG>I</FONT><FONT
size="3"><STRONG>nformation</STRONG></FONT></STRONG></FONT></STRONG>
</FONT></TD>
</TR>
<TR>
<TD style="WIDTH: 132px" align="right">Name* :
</TD>
<TD style="WIDTH: 193px">
<asp:textbox id=tbName tabIndex=1 runat="server" Width="180px"
Text='<%# DataBinder.Eval(Container, "DataItem.Naam") %>'>
</asp:textbox>
<asp:requiredfieldvalidator id="valName" runat="server"
ForeColor="White" ControlToValidate="tbName" Display="None"
ErrorMessage="Firstname
Required"></asp:requiredfieldvalidator></TD>
<TD style="WIDTH: 80px" align="right">Telephone* :</TD>
<TD>
<asp:textbox id=tbTel tabIndex=8 runat="server" Width="180px"
Text='<%# DataBinder.Eval(Container, "DataItem.Tel") %>'>
</asp:textbox>
<asp:requiredfieldvalidator id="valTel" runat="server"
ForeColor="White" ControlToValidate="tbTel" Display="None"
ErrorMessage="Telephonenumber
Required"></asp:requiredfieldvalidator></TD>
</TR>
<TR>
<TD style="WIDTH: 132px; HEIGHT: 17px" align="right">Address* :
</TD>
<TD style="WIDTH: 193px; HEIGHT: 17px">
<asp:textbox id=tbAddress tabIndex=2 runat="server" Width="180px"
Text='<%# DataBinder.Eval(Container, "DataItem.Adres") %>'>
</asp:textbox>
<asp:requiredfieldvalidator id="valAddress" runat="server"
ForeColor="White" ControlToValidate="tbAddress" Display="None"
ErrorMessage="Address
Required"></asp:requiredfieldvalidator></TD>
<TD style="WIDTH: 80px; HEIGHT: 17px" align="right">Fax :</TD>
<TD style="HEIGHT: 17px">
<asp:textbox id=tbFax tabIndex=9 runat="server" Width="180px"
Text='<%# DataBinder.Eval(Container, "DataItem.Fax") %>'>
</asp:textbox></TD>
</TR>
<TR>
<TD style="WIDTH: 132px" align="right">Zip and City* :</TD>
<TD style="WIDTH: 193px">
<asp:textbox id=tbPost tabIndex=3 runat="server" Width="35px"
Text='<%# DataBinder.Eval(Container, "DataItem.Postcode") %>'
MaxLength="4">
</asp:textbox>
<asp:textbox id=tbCity tabIndex=4 runat="server" Width="142px"
Text='<%# DataBinder.Eval(Container, "DataItem.Gemeente") %>'>
</asp:textbox>
<asp:requiredfieldvalidator id="valPost" runat="server"
ForeColor="White" ControlToValidate="tbPost" Display="None"
ErrorMessage="Zip Code Required"></asp:requiredfieldvalidator>
<asp:requiredfieldvalidator id="valCity" runat="server"
ForeColor="White" ControlToValidate="tbCity" Display="None"
ErrorMessage="City Required"></asp:requiredfieldvalidator></TD>
<TD style="WIDTH: 80px" align="right">Mobile :</TD>
<TD>
<asp:textbox id=tbMob tabIndex=10 runat="server" Width="180px"
Text='<%# DataBinder.Eval(Container, "DataItem.GSM") %>'>
</asp:textbox></TD>
</TR>
<TR>
<TD style="WIDTH: 132px" align="right">Country :
</TD>
<TD style="WIDTH: 193px">
<asp:dropdownlist id="dlCou" tabIndex="5" runat="server"
Width="180px"></asp:dropdownlist></TD>
<TD style="WIDTH: 80px" align="right">E.mail* :</TD>
<TD>
<asp:textbox id=tbEmail tabIndex=11 runat="server" Width="180px"
Text='<%# DataBinder.Eval(Container, "DataItem.email") %>'>
</asp:textbox>
<asp:requiredfieldvalidator id="valMailReq" runat="server"
ForeColor="White" ControlToValidate="tbEmail" Display="None"
ErrorMessage="EmailAddress
Required"></asp:requiredfieldvalidator>
<asp:regularexpressionvalidator id="valMailExpr" runat="server"
ForeColor="White" ControlToValidate="tbEmail" Display="None"
ErrorMessage="Not a Valid EmailAddress"
ValidationExpression="^([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-
9]
{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)
$"></asp:regul
arexpressionvalidator></TD>
</TR>
<TR>
<TD style="WIDTH: 132px" align="right">BankAccount :
</TD>
<TD style="WIDTH: 193px">
<asp:textbox id=tbBank tabIndex=6 runat="server" Width="180px"
Text='<%# DataBinder.Eval(Container, "DataItem.Bank") %>'>
</asp:textbox></TD>
<TD style="WIDTH: 80px" align="right">WebPage :</TD>
<TD>
<asp:textbox id=tbWeb tabIndex=12 runat="server" Width="180px"
Text='<%# DataBinder.Eval(Container, "DataItem.webpage") %>'>
</asp:textbox></TD>
</TR>
<TR>
<TD style="WIDTH: 132px" align="right">VAT-Number :
</TD>
<TD style="WIDTH: 132px">
<asp:textbox id=tbVat tabIndex=7 runat="server" Width="180px"
Text='<%# DataBinder.Eval(Container, "DataItem.BTW") %>'>
</asp:textbox></TD>
</TR>
<TR>
<TD align="center" bgColor="#e3ceab" colSpan="4" height="10">
<asp:label id="lblMsg2" runat="server"
BackColor="#E3CEAB"></asp:label></TD>
</TR>
<TR>
<TD style="WIDTH: 132px" align="right">PassWord* :
</TD>
<TD style="WIDTH: 193px">
<asp:textbox id=tbPass tabIndex=13 runat="server" Width="180px"
Text='<%# DataBinder.Eval(Container, "DataItem.wachtwoord") %>'
TextMode="Password">
</asp:textbox></TD>
<TD style="WIDTH: 80px" align="right">Remarks :</TD>
<TD style="HEIGHT: 81px" rowSpan="3">
<asp:textbox id=tbRem tabIndex=16 runat="server" Height="77px"
Text='<%# DataBinder.Eval(Container, "DataItem.remarks") %>'
TextMode="MultiLine">
</asp:textbox></TD>
</TR>
<TR>
<TD style="WIDTH: 132px" align="right">PassWord Again* :
</TD>
<TD style="WIDTH: 193px">
<asp:textbox id="tbPass2" tabIndex="14" runat="server"
Width="180px" TextMode="Password"></asp:textbox></TD>
<TD style="WIDTH: 80px" align="right"></TD>
<TD rowSpan="3"></TD>
</TR>
<TR>
<TD style="WIDTH: 132px; HEIGHT: 19px"
align="right">UserType :</TD>
<TD style="WIDTH: 193px; HEIGHT: 19px">
<asp:dropdownlist id="dlBez" tabIndex="15" runat="server"
Width="180px"></asp:dropdownlist></TD>
<TD style="WIDTH: 80px; HEIGHT: 19px"></TD>
</TR>
<TR>
<TD align="right" colSpan="4">
<asp:Label id="lblID" runat="server" Visible="false" Text='<%#
DataBinder.Eval(Container.DataItem,"ID") %>'>
</asp:Label>
<asp:button id="btUpd" tabIndex="17" runat="server"
Font-Bold="true" Text="Update" BackColor="#604820"
CommandName="Update" ToolTip="Click to update user..."
BorderColor="#C89F5A" ForeColor="#E3CEAB"></asp:button>
<asp:button id="btCan" tabIndex="17" runat="server"
Font-Bold="true" Text="Cancel" BackColor="#604820"
CommandName="Cancel" ToolTip="Click to cancel update"
BorderColor="#C89F5A" ForeColor="#E3CEAB"></asp:button></TD>
</TR>
</TABLE>
<asp:validationsummary id="ValidationSummary1" style="Z-INDEX: 102;
LEFT: 616px; POSITION: absolute; TOP: 104px"
tabIndex="18" runat="server" Width="226px"
ForeColor="White"></asp:validationsummary>
</EditItemTemplate>
</asp:TemplateColumn>
</Columns>
<PagerStyle NextPageText="" PrevPageText="" BorderStyle="None"
HorizontalAlign="Center" PageButtonCount="20"></PagerStyle>
</asp:datagrid><asp:datagrid id="dgUsers" style="Z-INDEX: 103; LEFT:
176px; POSITION: absolute; TOP: 168px" runat="server"
Width="664px" GridLines="None" AutoGenerateColumns="False"
AllowPaging="True" AllowSorting="True">
<SelectedItemStyle BackColor="#E29F5A"></SelectedItemStyle>
<AlternatingItemStyle BackColor="#BB8751"></AlternatingItemStyle>
<HeaderStyle BackColor="#E3CEAB"></HeaderStyle>
<Columns>
<asp:BoundColumn Visible="False" DataField="ID"
HeaderText="ID"></asp:BoundColumn>
<asp:ButtonColumn DataTextField="Naam" SortExpression="Naam"
HeaderText="Name" CommandName="Select"></asp:ButtonColumn>
<asp:HyperLinkColumn DataNavigateUrlField="email"
DataNavigateUrlFormatString="mailto:{0}" DataTextField="email"
SortExpression="email" HeaderText="Email"></asp:HyperLinkColumn>
<asp:BoundColumn DataField="Tel" SortExpression="Tel"
HeaderText="Telephone Number"></asp:BoundColumn>
<asp:HyperLinkColumn Target="_blank" DataNavigateUrlField="webpage"
DataTextField="webpage" SortExpression="webpage"
HeaderText="WebPage"></asp:HyperLinkColumn>
<asp:ButtonColumn Text="Delete"
CommandName="Delete"></asp:ButtonColumn>
</Columns>
<PagerStyle NextPageText="Next 10 Users" PrevPageText="Previous 10
Users" HorizontalAlign="Center"
BackColor="#E3CEAB" PageButtonCount="20"
Mode="NumericPages"></PagerStyle>
</asp:datagrid><asp:label id="lblMsg" style="Z-INDEX: 102; LEFT: 176px;
POSITION: absolute; TOP: 152px" runat="server"
Width="664px"></asp:label></form>
</body>
</HTML>