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 trial

C# ASP.NET MVC Basics Controllers Creating a Controller

it says Bummer, But works in Visual studio,the treehouse website took 30 minutes of my time not letting me move forward

this is really annoying ! can it show the answer after 10 times trying !!!!!!!!!?

VideoGamesController.cs
using System.Web.Mvc;

namespace Treehouse.Controllers
{
public class VideoGamesController : Controller 
 {
  public string Detail()
   {
      return " Welcome to the Video Game Detail page! " ;
   }
  }
}

1 Answer

andren
andren
28,558 Points

Challenges are very picky about the contents of strings, if your string does not match the one requested exactly as shown then you will often not be allowed to pass, even if the string is quite similar.

The issue in this case is that you have a space at the beginning and end of your string which does not belong there. If you remove the spaces like this:

return "Welcome to the Video Game Detail page!";

Then your code will work.