Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialTony Nilsson
717 PointsVideoGamesController
Hi, I would like some help with this challenge. I do not understand what the task is about.
using System.Web.Mvc;
namespace Treehouse.Controllers
{
public class VideoGamesController : Controller
{
public ActionResult Detail()
{
return new ActionResult()
{
Content = "Welcome to the Video Game Detail page!";
};
}
}
}
2 Answers
HIDAYATULLAH ARGHANDABI
21,058 Pointsusing System.Web.Mvc;
namespace Treehouse.Controllers
{
public class VideoGamesController : Controller
{}
}
Steven Parker
231,248 PointsYou're off to a good start, you've changed the return type correctly.
But you don't need to construct an object, just call the "Content" method, which has been inherited from Controller (and pass the string as the argument).