title: Creating Dynamic Menus - calling extern Function
body: <p>I got a requirement to create a dynamic menus using extern function so, we can consume it anywhere, following is the complete requirement :</p>
  
  <blockquote>
    <p>Please create a dynamic horizontal link menu in the top of the Master Page. This will be the menu that is displayed on every page.  We need to be able to set the links on this page from the code behind.  The information we want to set is the link text, and the link path (href).  The idea behind this is that based on who is logged into the application, and what page they are on, there will be different link possibilities. We should make this code reusable. The procedure to actually lay out the links would look something like this:</p>
  
  <pre><code>public static extern void SetDynamicLinks(Control ContainingControl, string[] arLinkTitles, string[] arLinks) { …code… }
  </code></pre>
    
    <p>We would call a procedure from the Page_Load of the Master Page that would decide what links we need to display.  This procedure would be application dependant.  This procedure would then call the "SetDynamicLinks" procedure mentioned above passing it the required parameters to make the correct links in the passed container control.</p>
  </blockquote>
  
  <p>Any help for above, will be most appreciated. Thanks in advance.</p>