jquery - Bootstrap Tags Input objects and json -
i trying use boorstrap tag input control located here:
http://timschlechter.github.io/bootstrap-tagsinput/examples/
in controller, creating list of selectlistitems:
var tags = new list<selectlistitem>(); tags.add(new selectlistitem { value = "1", text = "craig" }); tags.add(new selectlistitem { value = "2", text = "lister" }); model.tags = tags;
i pass model, 'tag' a:
public ienumerable tags { get; set; }
on view, render control:
<div class="row"> <div class="col-xs-12"> <label class="control-label text-right">tags:</label> <br /> @html.textboxfor(x=>x.tags, new { @class= "form-control txttags", @data_role= "tagsinput" }) </div> </div>
however, instead of seeing tags, control renders drop down list 2 items.
Comments
Post a Comment