I am having issue on passing string parameter from controller to view in the controller I have:
namespace Map02.Controllers
{
public class AppController : Controller
{
public ActionResult Index(string name)
{
string str = name;
return View(str);
}
}
}
and in view I have:
@model string
@{
ViewBag.Title = "";
}
<h2>AppContent</h2>
<p>@str</p>
but I am getting this error:

@strto@Modelreturn View((object)str);otherwise it will try to find a view that matchesstrreturn View((object)str);but not getting any output in page!nameisnull