0

I addded Data annotations in my class model, but it was not showing online, only offline.

[DisplayName("Last Name")]
public string Name { get; set; }

After some research I realised I was not doing anything wrong.

So, I decided to upload the whole site, instead of only the class file. And it worked out.

Than I found that I needed to upload the files in the bin directory. This was sufficient after a change to the dara annotations in a class model.

So my problem is already solved. I was not syntax related, nor was the class incorrect.

Why is that? Why do I need to update the bin directory?

  • Because your code is compiled into binaries that have to be found in the bin folder. If you don't compile and deploy your code doesn't get updated. cshtml and other dynamic pages get compiled on startup (unless compiled on deployment), so you can make changes to them on the fly. –  Jul 06 '17 at 12:51
  • I knew about the compilation... but I forgot about the bin – JCS Limburg Jul 06 '17 at 12:54

0 Answers0