forum

Home / DeveloperSection / Forums / Fill a form with ASP MVC Querystring

Fill a form with ASP MVC Querystring

Anonymous User 1985 26-Dec-2014
I want to fill a form with Id and i have made the url in this way

local-host:1613/Patient/Index/1

Where as 1 is the Id. And i want to fill my form with the data of patient with Id 1. But this below function is not being called in Controller

 public ActionResult Index(int id)
        {
            Patient p = new CEntities().Patients.Find(id);

            return View(p);
        }
//instead, i am getting into
 public ActionResult Index()
        {
            return View();
        }
I am new bie in ASP MVC, i have no idea in filling a form with any other way, i found a way but it shows my whole object in query string which is insecure. And this above solution is not working.

Updated on 26-Dec-2014
I am a content writter !

Can you answer this question?


Answer

1 Answers

Liked By