I am trying to get parameter form a View and passing it to the controller:
[HttpPost]
public string GetWord()
{
string word = Request["word"];
return word;
}
But I got an error
Indexing using the [] construct cannot be used for an Http Request expression
I looked at documentation and I don't know why it is not working. What should I do to fix this?
Aucun commentaire:
Enregistrer un commentaire