I am using a Asp.Net MVC application.
In the following code how can I avoid the two database calls for populating a dropdown?
[HttpGet]
public ActionList Upload(){
// do something
//For populating drop downlist take data from db
Return View("Upload");
}
[HttpPost]
public ActionList Upload(){
//do something
//again take data from db for populating dropdown
Return View("Upload");
}
Any other way than jQuery ajax method? Thanks