Add onblur event to ASP.Net MVC's Html.TextBox

Posted by justSteve on Stack Overflow See other posts from Stack Overflow or by justSteve
Published on 2010-05-08T17:52:39Z Indexed on 2010/05/08 17:58 UTC
Read the original article Hit count: 1035

Filed under:
|

What's the correct syntax for an HTML helper (in MVC2) to define an onblur handler where the textbox is generated with code like:

<%=Html.TextBox(
    "ChooseOptions.AddCount" + order.ID,
    (order.Count > 0) ?  AddCount.ToString() : "",
    new { @class = "{number: true}  small-input" }
)

thx

© Stack Overflow or respective owner

Related posts about asp.net-mvc-2

Related posts about htmlhelper