How to do a ASP.NET MVC Ajax form post with multipart/form-data?

Suppose your Ajax form like this: @using (Ajax.BeginForm("UploadFile", null, new AjaxOptions { HttpMethod="POST", UpdateTargetId = "result" }, new { enctype = "multipart/form-data" })) { <label id="lblUploadNewFile" for="fileUploadControl">Upload New File</label> <input…

Continue ReadingHow to do a ASP.NET MVC Ajax form post with multipart/form-data?

How to have two different inputs (one for mobile, one for desktop) modify the same variable?

//How to have two different inputs (one for mobile, one for desktop) modify the same variable? Use :visible selector username = $("input[name=userSearch]:visible").val(); $("input[name=userSearch]:visible") will be the visible input field.  

Continue ReadingHow to have two different inputs (one for mobile, one for desktop) modify the same variable?