Orientation in EJ 1 ASP.NET MVC Slider

5 Oct 2015 / 1 minute to read

This property is used to set the Slider in either horizontal or vertical direction. By default, Slider renders in horizontal direction. Data type of this property is “Enum”.

Possible Slider orientations are as follows,

Property Table for MVC

Property Allowed values Description
Orientation Vertical Displays the Slider in vertical direction
Horizontal (default value) Displays the Slider in horizontal direction

The following steps explains you on how to configure the Orientation property.

  1. In an VIEW page, add a helper element to render it as a Slider widget.
  • cshtml
  • // Add this code in your view page
    
    @(Html.EJ().Slider("BasicSlider").Height("150").Width("20").Orientation(Orientation.Vertical))

    Execute the above code example to render the following output.

    Orientation_img1

    Slider in vertical Orientation