Dynamic content in static content

Dynamic content in static content

I have got simple module in my asp mvc page where can I generate some static html content from database.

For example

<% RenderAction("Article", "Article", new { articleId = 1 });%>  

returns (PartialViewResult)

<ul>     <li><a href="someurl">Hello worlds</a></li> </ul> 

I would like to have possibility to use Url or even Html object in my static article for example (it could be also my custom object with limited functionality with generating links or rendering partial views)

<ul>     <li><a href="<%=Url.Action("Index", "Home")%>">Hello worlds</a></li> </ul> 

or even better

<div>   <p>my static content from database</p>      <% Html.RenderAction("SomeAction"); %> (It could be PartialViewResult)  </div> 

What do you think about it?

C#: Caching w/ method attributes VS manually using System.Web.Caching


Blank LogOn view in MVC application

What is the best practice for displaying the contents of a DataSet in ASP.net MVC v1.0?

54 out of 100 based on 39 user ratings 1064 reviews