asp.net.ph

DataBoundLiteralControl Class

System.Web.UI Namespace


Enables the implementation of <%# ... %> data binding syntax.

DataBoundLiteralControl Class Members

Collapse   Constructors

Visibility Constructor Parameters
public DataBoundLiteralControl ( Int32 staticLiteralsCount , Int32 dataBoundLiteralCount )

Collapse   Properties

Visibility Name Value Type Accessibility
public Text String [ Get ]

Collapse   Methods

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

Remarks

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.

Example

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>" );
}

 Show me 

Skip Navigation Links



Home
Suggested Reading


Previous page Back to top Next page

© 2000-2010 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 asp.net.ph