0

I have written html/css code to display the menus. Now i need to hide the multi level menus(links) using windows authentication. i mean we need to set the target audience for the links. But,. i do not have any idea where to specify the audience. How can i enable the target audiences? Please find the below example code.

<ul id="menu" style="height: 20px; text-align:center">
    <li><a href="#"  class="drop" >Scorecard</a><!-- Begin Home Item -->
            <div class="dropdown_5columns">
                <div class="col_1">
                    <ul id="dpn" class="greybox">
                        <li><a href="../../Dashboards/Scorecard/Scorecard.aspx" class="tooltip">Scorecard1</a>
                        </li>
                    </ul>
                </div>
            </div>
    </li>
</ul>

I have added DBname and dbpassword and wrote sql queries with in C# page and attached it to the master page. the code has no errors but its not showing the correct output.please help.

Could you suggest me to set the target audience on my above code.

Thanks in advance,
Asmath

migrated from stackoverflow.com May 22 '13 at 6:52

This question came from our site for professional and enthusiast programmers.

0

Since this is custom code SharePoint's OOTB audience functionality does not apply for this. You'll have to implement a similar logic into your custom code.

In the code-behind it is possible to check current users permissions and use that to prevent the user from seeing specific elements. For this to work properly you'll have to include something in your DB that can be used to tell which permissions the user should have in order to see the specific elements.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy