lundi 18 janvier 2016

How to display string from action result

there is a action: /Home/GetName, and return a string "Mike", the controller and action like:

public class HomeController : Controller
{
    public string GetName()
    {
        return "Mike";
    }
}

how can I display this action result in view? (without ajax is better)

Aucun commentaire:

Enregistrer un commentaire