code_junkie

linq, mvc and partial class

Nov 12th, 2011
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. public partial class User
  2. {
  3. public string FullName
  4. {
  5. get
  6. {
  7. return FirstName + " " + LastName;
  8. }
  9. }
  10. }
  11.  
  12. <%=ViewData.Model.FullName %>
  13.  
  14. CS1061: 'PR.Web.Models.User' does not contain a definition for 'FullName' and no extension method 'FullName' accepting a first argument of type 'PR.Web.Models.User' could be found (are you missing a using directive or an assembly reference?)
Add Comment
Please, Sign In to add comment