ASP.NET MVC Interface Controls - Width property


Width="100%"
Click Me!


Width="50%"
Click Me!


Width="25%"
Click Me!


Width="200"
Click Me!


auto width
Click Me!


Width="100%"


Width="50%"


Width="25%"


Width="200"


auto width


Width="100%"


Width="50%"


Width="25%"


Width="200"


auto width



The Width property may be set either by using fixed values (pixels) or by using a relative value (percentages).
If the Width is not specified the controls will have the same width as their container.
C#
  
    Html.Obout(new OboutButton("OboutButton1") { Width = Unit.Percentage(100)})
    Html.Obout(new OboutButton("OboutButton2") { Width = Unit.Pixel(200)})
Html.Obout(new OboutDropDownList("OboutDropDownList1") { Width = Unit.Percentage(100) }) Html.Obout(new OboutDropDownList("OboutDropDownList2") { Width = Unit.Pixel(200) })
Html.Obout(new OboutTextBox("OboutTextBox1") { Width = Unit.Percentage(100) }) Html.Obout(new OboutTextBox("OboutTextBox2") { Width = Unit.Pixel(200) })

"Having used both Telerik and Component Art controls I can definitely say that the Obout Suite offers the most flexible and easy to implement controls about. And for the few problems I have had the support team have been most helpful, often providing showcase examples to help me understand things."

Tim Finch

Random testimonial   All testimonials