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 17 | Next

Joydip Kanjilal

"ASP.NET Data Presentation Controls Essentials"

This method has an overloaded version that accepts the format
expression as an additional parameter that relates to the type of formatting that you
would require on the data to be displayed. The syntax for using the Eval() method
is shown as follows:
<%# DataBinder.Eval(Container.DataItem, "expression"[, "format"]) %>
As shown in the code snippet the Eval() method accepts two parameters:
The first of these parameters is the data container, that is, a data table, a data
set or a data view.
The second parameter is a reference to the value that needs to be assigned to
the control.
??? ??? ??? ??? ???
Introduction to Data Binding in ASP.NET
[ 8 ]
Refer to the following code snippet that illustrates, how you can use the
DataBinder.Eval() method to bind data:
Text='<%# DataBinder.Eval(Container.DataItem, "UserName") %>'>

You can use the overloaded version of the Eval() method to specify the format
expression (as an additional optional parameter) to display the data in your required
format. Refer to the following code snippet:
Text='<%# DataBinder.Eval(Container.DataItem, "LoginDate", "{0:dddd
d MMMM"]) %>'>

This code would display the LoginDate in the label control named lblLoginDate as
Sunday 15, April.


Pages:
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
hotel jelenia góra Russian bride Free English grammar and study guid powiekszenia wielkoformatowe counter strike 1.6