开发者

MVC 2 RenderVirtualPartial helper

开发者 https://www.devze.com 2022-12-22 04:34 出处:网络
I would like to create a HTML helper that works the same as Html.RenderPartial except I would like the partial to be rendered from ViewData or a model object and not a file on the filesystem.

I would like to create a HTML helper that works the same as Html.RenderPartial except I would like the partial to be rendered from ViewData or a model object and not a file on the filesystem.

example: <% Ht开发者_C百科ml.RenderVirtualPartial("Name", Model.MyPartialContent") %>

I can return string in my helper but i need to have code tags (ie <%= DateTime.Now %>) interpreted so assume I need do some kind of binary output stream writer?

thanks in advance

-Mark


why not add the futures and you can use renderAction, or you can render partial put pass a model over also

0

精彩评论

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