News Control
- 2 minutes to read
The ASPxNewsControl displays news or announcements on a web page (see the image below).
The ASPxNewsControl can function in bound and unbound modes:
Bound Mode
Use the control’s ASPxDataWebControl.DataSourceID property to bind it to a data source. To specify how the data source populates the control with items, use the following properties:
- ASPxNewsControl.DateField - specifies the data source field that supplies item dates;
- ASPxNewsControl.HeaderTextField - specifies the data source field that supplies item header content;
- ASPxNewsControl.ImageUrlField - specifies the data source field that supplies item image URLs;
- ASPxNewsControl.NavigateUrlField - specifies the data source field that supplies item URLs;
- ASPxNewsControl.TextField - specifies the data source field that contains item descriptions.
Unbound Mode
You can use the ASPxNewsControl.Items collection’s methods and properties to add new items and remove existing ones, access individual items, and so on.
Use the ASPxNewsControl.ItemSettings property to access item settings. For more information on item settings, see the following topic: NewsItem.
You can allow users to navigate to the top of the current page. To do this, set the ASPxNewsControl.ShowBackToTop property to true
. This shows the Back to top link within items. To specify custom text for this link, use the ASPxNewsControl.BackToTopText property. You can also specify the ASPxNewsControl.BackToTopImage property to display an image before this link.
Note
The ASPx
- The ASPx
Client object is the control’s client-side equivalent.News Control - On the client side, you can use the ASPx
Data property to access the client object.View Base. Client Instance Name - Use the ASPx
News property to access the available client events.Control. Client Side Events
The client-side API is always available for this control.