using System.Collections.Generic;
namespace A1_ActionResult.Controllers
public class HomeController : Controller
public ActionResult Index(string val)
string resultval = "~/"+ val + ".pdf";
return File(resultval, "application/pdf");
else if (val == "gotoabout")
return RedirectToAction("About", "Home");
return Content("You entered: " + val);
public ActionResult About()
ViewBag.Message = "Your application description page.";
public ActionResult Contact()
ViewBag.Message = "Your contact page.";