c# - How can I know if a non-required RenderSection exists? -


@* omitted code.. *@ @renderbody() @rendersection("sidebar", required: false) 

is there way know in omitted code part if rendersection sidebar exists or not?

@if (issectiondefined("sidebar")) {     @rendersection("sidebar") } else {     <div>some default content</div> } 

Comments

Popular posts from this blog

linux - Using a Cron Job to check if my mod_wsgi / apache server is running and restart -

actionscript 3 - TweenLite does not work with object -

jQuery Ajax Render Fragments OR Whole Page -