Answer the question
In order to leave comments, you need to log in
ASP.NET MVC not outputting "Hello World"?
We need to quickly get to grips with this technology. I have knowledge of C#, but I am not familiar with applied web technologies.
I write this code in HomeController.cs.
using Microsoft.AspNetCore.Mvc;
namespace PartyInvites1.Controllers
{
public class HomeContoller : Controller
{
public string Index()
{
return "Hello world";
}
}
}
Answer the question
In order to leave comments, you need to log in
std::sort(vector2->begin(), vector2->end(), [](const Type& a, const Type& b) {return a.length > b.length; });
vector <int> a;
for(int i=0; i < a.size(); i++)
{
for(int j=0; j < a.size();i++)
{
if(a[j] > a[j+1])
{
swap(a[j], a[j+1]);
}
}
}
The code in the question must be shown in full. in your project
using Microsoft.AspNetCore.Mvc;
namespace PartyInvites.Controllers
{
public class HomeController : Controller
{
public class HomeContoller : Controller
{
public ContentResult Index()
{
return Content("Hello world");
}
}
}
}
using Microsoft.AspNetCore.Mvc;
namespace PartyInvites.Controllers
{
public class HomeController : Controller
{
public string Index()
{
return "Hello world";
}
}
}
The Internet is full of step-by-step implementation examples from scratch. Take advantage of them.
Norm course on .net mvc, I figured it out myself, everything is step by step and in an extremely accessible language
https://metanit.com/sharp/mvc5
In general, if my memory serves me, then ActionResult should be returned there. In your case, you can do something like this: https://stackoverflow.com/a/553952/2822609
https://msdn.microsoft.com/en-us/library/system.we...
UPD. In this particular case, you can do this:
public ContentResult Index()
{
return Content("Hello world");
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question