asp.net mvc - How do I link to the base View Folder? -


in mvc, trying link view directly in view directory, page named "settings.cshtml". have tried following no success:

@html.actionlink("your settings", "settings", "view") @html.actionlink("your settings", "settings") @html.actionlink("your settings", "settings", "~/view") 

action links not link view, link action. need implement controller action returns view:

public actionresult settings() {     return view(); } 

if place in homecontroller, following actionlink should pick view:

@html.actionlink("your settings", "settings") 

if need lot, @ implementing more general action method allows pass in view name, so:

public actionresult showview(string viewname) {     return view(); } 

--

@html.actionlink("your settings", "showview", new { viewname = "settings" }) 

Comments

Popular posts from this blog

node.js - Bad Request - node js ajax post -

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -