asp.net mvc - Model binding for float fails -
i'm trying send window's position server. model binding top fails. action method below:
public void winclosed(window position) and window model:
public class window { public decimal left { get; set; } public double top { get; set; } } in picture can see sample values:

and javascript code:
var position = this.wrapper.offset(); $.post("@url.action("winclosed", "home")", position); the first line relative kendo window. i've tried double, , float types in model.
the decimal separator culture (fa-ir) / (forward slash) character. need replace . character / character. example
var offset = this.wrapper.offset(); var l = offset.left.tostring().replace('.', '/'); var t = offset.top.tostring().replace('.', '/'); $.post("@url.action("winclosed", "home")", {left: l, top: t });
Comments
Post a Comment