You might want to create an assistant in the App_Code folder. The code compiles and is available for all your razor views.
Add say say SiteHelper.cshtml and add helper method
@helper GenerateTabs()
{
<div>blah</div>
}
Then use it in any razor mode as
@SiteHelper.GenerateTabs()
source
share