How to get the path to a Nancy Razor view inside a view? -


i trying write extension method used inside razor view file path said view.

i have tried putting extension method on htmlhelpers<t> , nancyrazorviewbase cannot seem correct information view or render context e.g.

public static string getpath(this nancyrazorviewbase view) {     //is null, expecting c:\app\views\index.cshtml     return view.path; }  <input type="hidden" value="@this.getpath()"/> 

is possible path current view inside view?

i using nancy 0.23.

i had overlooked properties on negotiationcontext e.g. view.rendercontext.context.negotiationcontext.viewname.


Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -