I have a div id=title and input id=titleArea. I want to check if titleArea content exists before posting. I tried with getJSON but I understood I cannot get boolean values so I am getting string. emptu or not empty. The id is sent from script, I've checked that but no data is received
View script
JSON
public async Task OnGetCheckTitle(string id)
{
var checkTitle = await _context.BlogDatas.Where(s => s.Title == id).Select(s => s.BID).SingleOrDefaultAsync();
return new JsonResult(checkTitle);
} 
Sachin SinghPosted Nov 5, 2021, 4:28 PM
Marius VasilePosted Nov 5, 2021, 4:38 PM
Sachin SinghPosted Nov 5, 2021, 4:37 PM
if (!$.trim(data)) { $("#btnSubmit").attr("disabled", true)Marius VasilePosted Nov 5, 2021, 4:30 PM