自定义 ASP.NET 动态数据操作
在哪里可以拦截脚手架表的读取和更新?我需要将某些记录或字段设置为仅对某些人员和/或在特定日期之后只读?我还有一个部门列表,单击一个部门会显示该部门的类别列表。我需要阻止普通用户访问部门列表,并且只显示其部门的类别。我怎么能这么做呢?
Where can I intercept reads and updates for scaffolded tables? I need to make certain records or fields read only to certain people and or after a certain date? I also have a Departments list, where clicking a department brings up a list of Categories for that department. I need to block access to the Department list to normal users, and only bring up Categories for their department. How could I do that?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我将为每个实体创建一个自定义页面并监听 LinqDataSource 的选择事件并在其中添加参数/过滤结果。
您还可以添加自定义字段模板以在单个字段级别进行额外控制。
I would make a Custom Page for Each Entity and listen to the LinqDataSource's Selecting Event and add parameters/filter results there.
You could also add Custom FieldTemplates for additional control at the individual field level.