ASPxHeadline Class
Represents an ASPxHeadline control.
Namespace: DevExpress.Web
Assembly: DevExpress.Web.v24.1.dll
NuGet Package: DevExpress.Web
Declaration
Remarks
The ASPxHeadline control can be used when composing news announcements on a web page. It is utilized as a constituent part of the ASPxNewsControl. The ASPxHeadline control can be also used independently when it’s needed to represent custom news.
Create a Headline Control
Design Time
The ASPxHeadline control is available on the DX.24.1: Navigation & Layout toolbox tab in the Microsoft Visual Studio IDE.
Drag the control onto a form and customize the control’s settings, or paste the control’s markup in the page’s source code.
<dx:ASPxHeadLine HeaderText="The ExpressQuantumGrid Suite v6 is Now Available" TailText="Details"
ID="headLine" runat="server" ContentText="November 17, 2006 - We are happy to announce..."
Date="11.17.2006" NavigateUrl="...">
</dx:ASPxHeadLine>
Run Time
using DevExpress.Web;
...
protected void Page_Load(object sender, EventArgs e)
{
ASPxHeadline headLine = new ASPxHeadline();
headLine.ID = "headLine";
Page.Form.Controls.Add(headLine);
headLine.HeaderText = "The ExpressQuantumGrid Suite v6 is Now Available";
headLine.TailText = "Details";
headLine.ContentText = "November 17, 2006 - We are happy to announce...";
headLine.NavigateUrl = "...";
DateTime date = new DateTime(2006, 11, 17); // Year, Month, and Day.
headLine.Date = date;
}
Note
DevExpress controls require that you register special modules, handlers, and options in the Web.config file. You can change this file or switch to the Design tab in the Microsoft Visual Studio IDE to automatically update the Web.config file. Note that this information is automatically registered if you use the DevExpress Template Gallery to create a project.
The ASPxHeadline class provides properties that allow the control’s content, date, header, tail and other elements to be customized.
Content
- ASPxHeadline.ContentText - specifies the headline’s contents;
- ASPxHeadline.MaxLength - specifies the maximum length of the headline’s text;
- ASPxHeadline.ShowContentAsLink - specifies whether the text is displayed as a hyper link that when clicked, navigates the application to the location specified by the ASPxHeadline.NavigateUrl property;
- ASPxHeadline.ContentStyle - provides access to the style settings used to paint the headline’s contents;
- The headline’s image is specified by the ASPxHeadline.Image property. Its position within the headline is specified by the ASPxHeadline.ImagePosition property.
For more information, see Headline Content.
Date
- ASPxHeadline.Date - specifies the headline’s date;
- ASPxHeadline.DateFormatString - specifies the pattern used to format the headline’s date;
- ASPxHeadline.DateHorizontalPosition - specifies the date’s horizontal position within the headline;
- ASPxHeadline.DateVerticalPosition - specifies the date’s vertical position within the headline;
- ASPxHeadline.DateStyle - provides access to the style settings used to paint the headline’s date.
For more information, see Headline Date.
Tail
- ASPxHeadline.TailText - specifies the text of the headline’s tail;
- ASPxHeadline.TailImage - specifies the tail image.
For more information, see Headline Tail.
It’s also possible to display the headline’s header. To do this, specify its text via the ASPxHeadline.HeaderText property.
Note
The ASPxHeadline control doesn’t implement any public client-side API.