asp.net mvc - How can i load partial view dynamically? -
how can load partial view dynamically?i tried use querystring below got error when runtime.
my code:
@html.partial("_sample?id=3")
you can like:
@html.action("sample", "users", new { userid = 1 })
and in userscontroller
:
[childactiononly] public actionresult sample(int userid) { // stuff here }
Comments
Post a Comment