Is it possible to utilize internal methods on controllers to reduce duplication?
Posted
by Maslow
on Stack Overflow
See other posts from Stack Overflow
or by Maslow
Published on 2010-04-09T16:28:43Z
Indexed on
2010/04/09
17:03 UTC
Read the original article
Hit count: 353
asp.net-mvc
|asp.net-mvc-partialview
in a partial view I have the following:
<%Html.RenderAction(MVC.User.GetComments(Model.UserGroupName)); %>
can I render a Controller
's PartialViewResult
in a View
without going through routing so I can pass arguments directly from the model so that the arguments I'm passing to the controller never get sent to the user or seen by the user?
Currently the method I'm showing at the top throws an exception because no overload is public. I've got it marked as internal so that a user can not access it, only the rendering engine was my intent.
© Stack Overflow or respective owner