I have to call the method in the controller from view, but not using any click, so I am thinking to do it using the following line of code:
@Html.RenderAction("Replies", new { id= item.ID})
and my method in the controller is like this:
public post Replies(int Id)
{
post posts = new post();
posts = new Data_Access().Get_Replies(Id);
return posts;
}
but this is showing error saying that "can not implicitly convert type void to object"
can any one please help me..
thanks