How to show or hide left content of content pages through master page in asp.net
<p>I am working on an asp.net C# webforms project which has master/content pages. While some content pages will have a list of page specific links, say in an asp.net panel on their left side, the rest will not have it. I am wondering what will be best way to do it. For this, the content page which will have the left nav links, will communicate with the master page so that the master page will show or hide the left nav panel, and the content page will populate it. Having the left nav as part of the content page itself was easier, as I was displaying it as follows:</p>

<pre><code>When the content page had the left nav:

&lt;div class="row"&gt;
  &lt;div class="col-md-3"&gt;
    --Left nave goes here--
  &lt;/div&gt;
  &lt;div class="col-md-9"&gt;
    --Rest of the contents go here--
  &lt;/div&gt;
&lt;/div&gt;

When the content page didn't have the left nav:

&lt;div class="content"&gt;   
  --All the contents go here--
&lt;/div&gt;
</code></pre>

<p>Any good approach to do it through the master page will be greatly appreciated!</p>