Click here to Skip to main content
15,922,894 members
Please Sign up or sign in to vote.
4.00/5 (2 votes)
See more:
I hope create common custom partial view.
I use this for bottom menu in several pages. When certain page selected, corresponding tab in bottom menu is highlighted. In my opinion renderpartial method has only model parameter. I need pass my own parameter to renderpartial such as string, int, etc...
Could someone help me? If there are some useful src or url, then please notice me.
Posted

1 solution

Why don't you want to put these custom variables in the model?
The model can be anything you like.

The partial view is exactly the same as a normal view, except it won't include the layout.
So If you know how to do it in a 'normal' view you can do the same in a partial.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900