使用xmldatasource或sitemapdatasource的xml驱动菜单 [英] xml driven menus using xmldatasource or sitemapdatasource

查看:75
本文介绍了使用xmldatasource或sitemapdatasource的xml驱动菜单的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我是C#开发人员.我正在使用web.sitemap文件创建菜单,在该菜单中,我必须根据用户类型(管理员,员工)从登录页面控制(访问)这些菜单.

我必须在不使用sqldatabase的情况下完成此任务,而可以使用sitemapdatasource,xmldatasource.

因此,我无法在asp.cs页中实现对xml文件的控制.

如果有人遇到此类问题并有解决方案,请告诉我.

如果是这样,请告诉我代码.

谢谢

Hi

I am C# developer.I am creating menus using web.sitemap file,where i have to control(to make accessible) those menus from login page based on type of user(Admin,Employee) like this.

I have to achieve this task without using sqldatabase instead we can make use of sitemapdatasource,xmldatasource.

SO i am not able to achieve controls of of xml file in asp.cs page.

If anybody has come across this type of problem and has solutions please let me know.

If so let me know the code.

Thank you

推荐答案

如果所需的功能不是开箱即用的控件,则您将无法使用可用的功能,则必须自己动手.

您可以从这里开始:
http://msdn.microsoft.com/en-us/library/system. web.ui.hierarchicaldatasourcecontrol.aspx [ ^ ]这是SiteMapDataSource的基类.

对于ASP.NET中不适合您的位,这是一种常见的方法.我已经撰写了不止一份Auth&身份验证提供者.

干杯.
If the functionality you want isn''t in the control out-of-the box, and you can''t use the functionality available to you, you''ll have to roll your own.

You can start here:
http://msdn.microsoft.com/en-us/library/system.web.ui.hierarchicaldatasourcecontrol.aspx[^] That is the base class for SiteMapDataSource.

This is a common approach for bits inside ASP.NET that don''t fit for you. I''ve written more than one Auth & Auth provider.

Cheers.


http://weblogs.asp .net/scottgu/archive/2006/02/14/438241.aspx [ ^ ]

http://asp-net- example.blogspot.com/2008/10/menu-example-how-to-use-menu-control-in.html [
http://weblogs.asp.net/scottgu/archive/2006/02/14/438241.aspx[^]

http://asp-net-example.blogspot.com/2008/10/menu-example-how-to-use-menu-control-in.html[^]


这篇关于使用xmldatasource或sitemapdatasource的xml驱动菜单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆