This is the view :
@foreach (var module in Model)
{
if (module.Placeholder == "head")
{
Html.RenderAction(module.Control, "ContentHtml", module.Content);
}
<br />
}
And this is the controller :
public ActionResult Tabelar2(string content)
{
var movies = db.ContentHtmls.Where(s => s.Content.Contains(content));
return View(movies);
}
This works only when i set the content 'test1' in the url , example localhost:58881/Home/About/test1 , what I want is how to read the module.Content field into database in this row
Html.RenderAction(module.Control, "ContentHtml", module.Content);
, and then pass that value into the controller
public ActionResult Tabelar2(string content)
, so it can show only the News with that content. This line
Html.RenderAction(module.Control, "ContentHtml", module.Content);
goes to ContentHtml controller , to the certain Action based on module.Control , in this case Tabelar2 , and the route values should be the module.Content.
What I have tried:
I just explained the problem above