Check out the new Caption property that saves you time from adding extra label controls and also helps with alignment. So you can create nice edit layouts like this:
The new Caption property, in the v14.1 release, lets you set the editor's prompt text for the DevExpress ASP.NET Text Editors.
Customize Caption Appearance
You can use the following properties to customize the appearance of the caption:
- Position– specifies the position of a caption related to the editor.
- HorizontalAlign, VerticalAlign– specify the horizontal and vertical alignment of a caption.
- ShowColon– specifies whether the colon sign is displayed after caption text.
- RequiredMark– specifies text displayed after a caption when the editor value is required.
- OptionalMark– specifies text displayed after a caption when the editor value is optional.
- RequiredMarkDisplayMode– specifies which mark should be displayed after a caption.
Try this functionality now with our online Data Editors - Caption ASP.NET WebForms demo.
ASP.NET WebForms and MVC
The Caption property is available for both ASP.NET platforms: ASP.NET WebForms and ASP.NET MVC.
Save time with this example
Here's a great example of how DevExpress ASP.NET Text Editors and their rich properties save you time (thanks to Don for this tip).
As most web developers know, it takes effort to setup a nice form on an ASP.NET web page. Typically, you set it up by inserting a table with 2 or 3 columns for caption, control, and an optional indicator for a tooltip. Also don’t forget to set the associated control id with the caption.
However, the same can be accomplished by the following markup using the rich DevExpress ASP.NET Editors. You can use the Caption property along with other DevExpress ASP.NET Editor properties like: CaptionCellStyle->Width, RequiredField, HelpText, and NullText:
This saves you the hassle of using a table for the layout and extra label controls in front of the TextBox controls.
Your Next Great .NET App Starts Here
Year after year, .NET developers such as yourself consistently vote DevExpress products #1.
Experience the DevExpress difference for yourself and download a free 30-day trial of all our products today: DevExpress.com/trial (free support is included during your evaluation).