User Role wise menu or option display in Asp.net

 

            <asp:LoginView ID="LoginView1" runat="server">

                <RoleGroups>

                    <asp:RoleGroup Roles="X">

                        <ContentTemplate>

                            put RoleX's TreeView here

                        </ContentTemplate>

                    </asp:RoleGroup>

                    <asp:RoleGroup Roles="Y">

                        <ContentTemplate>

                            put RoleY's TreeView here

                        </ContentTemplate>

                    </asp:RoleGroup>

                </RoleGroups>

            </asp:LoginView>