How To Format Data With Binding Expressions In Asp.Net


show more Formatting data with binding expressions provides you with in-depth training on Developer. Taught by David Gassner as part of the ASP.NET Essential Training show less
please wait ...

Formatting data with binding expressions

When you present dynamic data on a webpage using the GridView or the DataList components, you can use formatting expressions to format data such as numbers and date time values. For this demonstration, I'll use the file Titles.aspx that's part of the chapter's Exercise Files. Let's start off taking a look at the page in Design View. In this page there is a DataList control that's bound to the SqlDataSource component at the bottom of the page and the SqlDataSource component is retrieving data from the server -side database's Titles table.

Now let's take a look at the source code. You will see that this version of the Item Template uses an ASP panel wrapped around the set of labels. Each of the labels is displaying a value from one column of the table. The title, the price and the publication date. Binding expressions are being passed into the text properties of each of the labels. Now I'll run the page in the browser so we can see the results so for. So in ...

Formatting data with binding expressions
Video duration: 6m 20s 6h 24m Beginner Updated Feb 13, 2013

Viewers:

Formatting data with binding expressions provides you with in-depth training on Developer. Taught by David Gassner as part of the ASP.NET Essential Training

Subjects:
Developer Web
Software:
ASP.NET
Author:
please wait ...