How to set data-bind in ASP MVC CSHTML way?

2 posts, 1 answers
  1. Tiago
    Tiago avatar
    2 posts
    Member since:
    May 2015

    Posted 24 May 2015 Link to this post

    Hi all,

    How to represent the following in ASP MVC cshtml way - Html.Kendo().Button :

    <button data-bind="click: enableInput, enabled: isNameEnabled">Enable</button>

    Assuming kendo.observable has been implemented.



  2. Answer
    Alexander Popov
    Alexander Popov avatar
    1440 posts

    Posted 26 May 2015 Link to this post

    Hello Tiago,

    This could be achieved using the HtmlAttributes method. For example: 
        .HtmlAttributes(new {data_bind = "click: enableInput, enabled: isNameEnabled" })

    Alexander Popov
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top