views:

86

answers:

2

hi,

in my application i want to bind the data to a div, which is in a datalist so how can i bind the value .thank you

A: 

Use <%# Eval("Name of your data field") %> to bind to properties in your datasource.

ryudice
i have a datalist in datalist itemtemplate contain div then how can i bind mr. ryudice
Surya sasidhar
A: 

Use a Panel that contains a Literal control. The Panel will render as a div and the Literal control renders as text. You will data bind to the Literal control's Text property. This will give you what you want. A div that contains text for each item displayed in a DataList control.

Be creative in combining controls to give you the layout, format, data-binding, and so on that you need. If it gets too complex, create a user-control

AMissico
thank you Mrs. Amissico it is working
Surya sasidhar
@Surya sasidhar: You are welcome.
AMissico