Is there a way to call a controller without clicking on a link?
By this I mean, without using @Html.ActionLink
for example, something automatic that's call after a condition.
Thanks in advance !
Edit :
There is some code :
if (IsPost)
{
if (!Request["idInterventions"].IsEmpty())
{
string[] AllStrings = Request["idInterventions"].Split(',');
List<int> list = new List<int>();
foreach (string item in AllStrings)
{
int value = int.Parse(item);
list.Add(value);
}
Model.toFacture(list);
isDone = true;
//Need to call a controller method here
}
}
So my code is triggered after a POST.