pieceniuche
New Member
here's a very simple class (Test.cs)\[code\]using System;using System.Collections.Generic;using System.Linq;using System.Web;using System.Web.Mvc;namespace MvcApplication5.Models{ public class Test { public string add(string s) { return s + "blaaaaa"; } }}\[/code\]and a view (Index.cshtml)\[code\]@model MvcApplication5.Models.Test@{ ViewBag.Title = "Homepage";}@Model.add("test")\[/code\]I get a System.NullReferenceException: Object reference not set to an instance of an object, but I don't know why.thanks, roxor