0

I found some posts about how to create a dynamic virtual view using custom virtual path provider. Here is the post

But I would like to know how to implement data annotation in that virtual view.

Or what is the best pattern to do validation on virtual view?

EDIT 1: Actually, my question is incomplete. I want to do something like CMS. View will be dynamic and the contents in it as well. But they will call to same ViewController function, what is the best approach to handle the validation? Is it possible to generate the data annotation based on the dynamic contents?

Thanks.

Community
  • 1
  • 1
wirol
  • 49
  • 1
  • 6

1 Answers1

0

It isn't any different than using a View as a file. You use the same exact code for the view itself. Just that the view is pulled from a database instead of a file.

Erik Funkenbusch
  • 92,674
  • 28
  • 195
  • 291