SEARCH
0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Prev | Current Page 101 | Next

Joydip Kanjilal

"ASP.NET Data Presentation Controls Essentials"


??? ??? ???
Working with the DataList Control
[ 104 ]
The following code listing shows how your .aspx code for this control with edit
mode enabled would look:
"Both" CellPadding="3"
CellSpacing="0"
Font-Names="Verdana"
Font-Size="12pt"
Width="150px"
OnEditCommand = "Employee_Edit" runat="server">










EmpCode: Text='<%# Eval("EmpCode") %>'>



EmpName: Text='<%#
DataBinder.Eval(Container.DataItem,
"EmpName") %>'>



Basic: runat="server"
Text='<%# DataBinder.Eval(Container.DataItem,
"Basic") %>'>



Chapter 4
[ 105 ]











The corresponding event handler to handle the edit operation, Employee_Edit, is
defined as follows:
protected void Employee_Edit(object source, DataListCommandEventArgs
e)
{
DataList1.


Pages:
8990919293949596979899100 101 102103104105106107108109110111112113hotel jelenia góraRussian brideFree English grammar and study guidpowiekszenia wielkoformatowecounter strike 1.6

Employee Code

Employee Name

Basic

Dept Code

<%# DataBinder.Eval(Container.DataItem,
"EmpCode")%>

<%# DataBinder.Eval(Container.DataItem,
"EmpName")%>

<%# DataBinder.Eval(Container.DataItem,
"Basic")%>

<%# DataBinder.Eval(Container.DataItem,
"DeptCode")%>

CommandName=?»Edit?» >
Edit