skip to Main Content

Ajax Call to ASP.NET MVC controller – Jquery ajax

The jQuery code is : var props = [ { "Name": "firstName", "Value": "firstValue" }, { "Name": "secondName", "Value": "secondValue" } ]; $.ajax({ url: '/myURL', contentType: "application/json", async: true, type: "POST", data: JSON.stringify(props), error: function (jqXHR, textStatus, errorThrown) { console.log("FAIL:…

VIEW QUESTION

How to define output parameter in Task<IActionResult> – Asp.net

I'm switching tech stacks so I'm a bit confused here. This function should return an object public async Task<IActionResult> Search(CoinModel Coin) { var date = Coin.tracking_date.ToLocalTime().ToString("dd/MM/yyyy"); var dateformat = DateTime.Parse(System.Web.HttpUtility.UrlDecode(date + " 00:00:00.0000000")); var issue = await _db.Coins.SingleOrDefaultAsync(c => c.coin…

VIEW QUESTION
Back To Top
Search