Form25
Form25 is a powerful layout and form container control designed
to build structured pages using cards, tabs, headers, footers, buttons, and alerts.
It supports both single-card forms and multi-tab forms with horizontal or vertical
tab orientation.
Key Features
- Card-based form layout
- Horizontal tab support
- Header and footer sections
- Configurable action buttons
- Alert message support
- Automatic window close with timer
Public Properties
- ControlId – Unique identifier for the form
- CardTitle – Title text displayed on the form card
- CardColor – Background color of the card header
- AlignTabHeight – Aligns tab height automatically
Enums
ButtonAction
- Button – Normal button
- Submit – Submit button (default)
ButtonSize
- S1 – 100px
- S2 – 150px
- S3 – 200px
- S4 – 250px
- S5 – 300px
- Max – 100%
- Auto – Automatic width
AlertType
- Success
- Info
- Warning
- Error
Core Methods
AddButton
Adds an action button to the form.
form.AddButton("btnsubmit","Update", "Save")
AddCard
Adds a card section to the form. Supports both standalone cards
and tab-based content.
form.AddCard(htmlstr,1,false);
form.AddCard(htmlstr1,2,false);
AddTab
Adds a tab header for multi-tab forms.
form.AddTab(1, "General");
form.AddTab(2, "Details");
AddAlert
Displays alert or notification messages.
form.AddAlert(Model.Response)
AutoClose
Automatically closes the window after a specified number of seconds
and refreshes the parent window.
form.AutoClose(5);
Generating the Form
Once all sections, tabs, and buttons are configured, call
GetHtml() to render the form.
@Html.Raw(form.GetHtml())
Tabbed Form Example
form.CardTitle = "Form1";
form.AddButton("btnsubmit", "Update", "save");
form.ControlId = "Form1";
form.AlignTabHeight = false;
form.Orientation = Form25.TabOrientation.Horizontal;
if (Model.Response2 == "OK")
{
form.AutoClose(3);
}
form.AddFooter(buttonHtml, false);
form.AddHeader("Form1", buttonHtml, true);
form.AddCard(htmlstr, 1, false);
form.AddTab(1, "Info");
form.AddCard(OrderStr, 2, false);
form.AddTab(2, "Order");
form.AddAlert(Model.Response);
@Html.Raw(form.GetHtml())