开发者

How to create dynamic views in asp.net mvc?

开发者 https://www.devze.com 2022-12-23 18:28 出处:网络
How 开发者_高级运维to create dynamic views in asp.net mvc 2.0?A better way to think about this is to have a generic view page that renders some HTML that administrator defines and which gets stored in

How 开发者_高级运维to create dynamic views in asp.net mvc 2.0?


A better way to think about this is to have a generic view page that renders some HTML that administrator defines and which gets stored in a database. Another alternative would be to create static HTML files -- assuming the content is fixed or could be retrieved via AJAX -- and have a view which dynamically chooses which of these HTML files to from your generic view. I use this latter method to make certain parts of a link aggregator site I've put together maintainable by others. It renders HTML fragments (stored in content/static/*.htm) onto fixed parts of the index page/view using jQuery load. The admins have access to modify these files to rearrange/add/delete the links contained on that part of the page. The app is at an early stage of development and eventually these will migrate either into configuration files, and I will generate the HTML, or perhaps I'll develop an administrative interface to manage them and keep them in the DB.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号