On a button click event i am trying to pass a textbox value to a controller . I am able to view the text box values by using console but in controller always returns null
this is my razor code
@{
ViewData["Title"] = "Index";
Layout = "Commonlayout";
}
@*Index
*@
@**@
To be Validated
and my controller is as follows
public JsonResult getresult(string name)
{
}
I am not sure where i am wrong please guide.
Rajkiran SwainPosted Mar 29, 2023, 8:14 PM
Vishal YelvePosted Mar 29, 2023, 1:33 PM
try this
add dataType: "JSON"