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

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

javascript - jQuery .height() return 0 when visible but non-0 when hidden -