CS4 webControl25

CS4 webControl25

RadioBox25

RadioBox25 is a reusable radio button control designed to render a group of selectable options with consistent styling. It supports horizontal or vertical layouts, default selection, optional postback submission, and frame-based spacing for structured forms.

Key Features

  • Renders a group of radio buttons from a list
  • Supports horizontal and vertical alignment
  • Allows default selected value
  • Optional automatic form postback
  • Frame view spacing support
  • Bootstrap-compatible styling

Control Properties

RadioBox25 can be configured using the Properties class or by passing parameters directly to GetHtml.

  • ControlId – Unique name for the radio group
  • Label – Label displayed above the radio buttons
  • ItemName – List of radio button options
  • ReturnValue – Value that should be selected by default
  • EnablePostback – Submits the form on selection change

Default Selection

The value specified in ReturnValue is automatically marked as selected when the control is rendered.

Sample Code


 var Gender = new RadioBox25.Properties()
  {
      ItemName = Model.GenderList,
      ControlId = "Gender",
      ReturnValue = Model.Gender,
      Label = "Gender",
      FrameView = false
  };
  htmlstr += RadioBox25.GetHtml(Gender);