I am trying return a string from controller to the same view in MVC
but its returning to a new view
Below is the code of my view:
@using (Html.BeginForm("Index2", "home", FormMethod.Post))
{
<label></label>
<input type="submit" value="Click Me" />
}
Below is the code of my controller:
public ActionResult Index2()
{
string _return = "Hello world";
return Content(_return);
}
how can I display "hello world" in the label
thanks.....
model-view-controlertag specifically states to useasp.net-mvctag for ASP.NET MVC questions.