I have a problem with my viewresult for my index page. I have searched here and on Google for the solution. So here is my code.
public class UserController : Controller
{
private ProjectsDB db = new ProjectsDB();
//
// GET: /User/
EnvironmentVariableTarget
public ViewResult Index()
{
var model = from p in db.Projects where p.UserName == User.Identity.Name select p;
return View(model);
}
And this is my error:
Member modifier 'public' must precede the member type and name.
What am I doing wrong?
That EnvironmentVariableTarget
part is wrong. It shouldn't be there, that's why you get the error on the next sentence
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With