Buttons:

Creating a Normal Button:

@using htmlHelpers.Enums
@using htmlHelpers.Extensions


@Html.Sushi().Button()
.SetAction("Index")
.SetBehaviour(HtmlBehaviourType.Link)
.SetType(ButtonType.Primary)
.SetCaption("Hello Sushi, Link Behaviour Primary Type, Index Action") @Html.Sushi().Button()
.SetAction("Index")
.SetBehaviour(HtmlBehaviourType.Link)
.SetType(ButtonType.Danger)
.SetCaption("Hello Sushi, Link Behaviour, Danger Type, Index Action") @Html.Sushi().Button()
.SetBehaviour(HtmlBehaviourType.Button)
.SetType(ButtonType.Default)
.SetCaption("Hello Sushi, Button Behaviour, No Action, Default Type") @Html.Sushi().Button()
.SetBehaviour(HtmlBehaviourType.Submit)
.SetType(ButtonType.Success)
.SetCaption("Hello Sushi, Submit Behaviour, Success Type") @Html.Sushi().Button()
.SetAction("Index")
.SetBehaviour(HtmlBehaviourType.Link)
.SetType(ButtonType.Info)
.SetCaption("Hello Sushi, Link Behaviour, Info Type")

This creates the html:

 

<a class="btn btn-normal btn-primary" href="Index" id="SushiButton1">Hello Sushi, Link Behaviour Primary Type, Index Action</a>
<a class="btn btn-normal btn-danger" href="Index" id="SushiButton2">Hello Sushi, Link Behaviour, Danger Type, Index Action</a>
<input class="btn btn-normal" id="SushiButton3" type="button" value="Hello Sushi, Button Behaviour, No Action, Default Type" />
<input class="btn btn-normal btn-success" id="SushiButton4" type="submit" value="Hello Sushi, Submit Behaviour, Success Type" />
<a class="btn btn-normal btn-info" href="Index" id="SushiButton5">Hello Sushi, Link Behaviour, Info Type</a>

 

And the result is:

Result Buttons Creation

Last edited May 10, 2012 at 3:14 PM by jmanuelcorral, version 3

Comments

No comments yet.