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 -

Socket.connect doesn't throw exception in Android -

iphone - How do I keep MDScrollView from truncating my row headers and making my cells look bad? -