| ||||||||||||||||||||||||||||||||||
DataBoundLiteralControl ClassEnables the implementation of
|
||||||||||||||||||||||||||||||||||
| Visibility | Name | Parameters | Return Type |
|---|---|---|---|
| protected | CreateControlCollection | ( ) | ControlCollection |
| protected | LoadViewState | ( Object savedState ) | Void |
| protected | SaveViewState | ( ) | Object |
| public | SetDataBoundString | ( Int32 index , String s ) | Void |
| public | SetStaticString | ( Int32 index , String s ) | Void |
This class creates a control for HTML text to allow the handling of <%# data-binding expressions %> that are processed by the server.
The DataBoundLiteralControl persists the value of its Text property to view state. This class cannot be inherited.
The following example illustrates using the DataBoundLiteralControl object to programmatically access the data associated with a given RepeaterItem object in a Repeater control.
foreach ( RepeaterItem item in myRepeater.Items ) {
Response.Write ( ( ( DataBoundLiteralControl ) item.Controls [ 0 ] ).Text + "<br>" );
}
Check out related books at Amazon
© 2000-2008 Rey Nuñez All rights reserved.
If you have any question, comment or suggestion
about this site, please send us a note
You can help support aspxtreme