asp.net mvc: Index was out of range exception in jQuery -
asp.net mvc: Index was out of range exception in jQuery -
in jquery need have this:
if (@(model.listitems.count) > 0) if ('@(model.listitems[0].date)' != '') .......
which when model.listitems.count 0 won't work, throws
index out of range
exception in next line. makes sense deed this, because of evaluation of expressions, can deed intend?
i have figured out: code becomes:
@if (model.listitems.count > 0) { if (model.listitems[0].date!= null) <text> ...... </text> }
jquery asp.net-mvc exception
Comments
Post a Comment