Last post Jun 03, 2019 10:33 AM by demoninside9
May 31, 2019 11:32 AM|demoninside9|LINK
In my MVC application there is a menu. See the below image. I Press F12 and find the rendered html.
I have both controllers EmailSettingsController and BeneficiaryController and both have Index views.
The strange this that when I click <a href="/EmailSettings/Index/1>Email Settings</a> it works perfectly but when I click <a href="/Beneficiary/Index/1>Payment recipient</a>
it shows the below result.
As you van see the url in address bar. I am unable to find out the cause, because there is nothing wrong with my controller and views both exists.
May 31, 2019 01:29 PM|mgebhard|LINK
First rebuild the application if you made recent changes. If rebuild has no affect, then you are missing either the Beneficiary controller, the Index method, or the Index method is configured as [HttpPost] and does not have an [HttpGet].
Jun 03, 2019 03:35 AM|demoninside9|LINK
you are missing either the Beneficiary controller, the Index method, or the Index method is configured as [HttpPost] and does not have an [HttpGet].
Below is my controller.
public class BeneficiaryController : Controller
private CPMVCEntities1 db = new CPMVCEntities1();
// GET: Beneficiary
public ActionResult Index()
[HttpGet] // gettig data for jquery datatables in json format
public JsonResult getData()
int country_id = Convert.ToInt32(Session["USER-Country"].ToString());
var jsonData = new
data = db.Beneficiary_Master.Where(m => m.CountryID == country_id)
return Json(jsonData, JsonRequestBehavior.AllowGet);