Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个动态数据列,我想用 Session 集合中的一个字段填充它。(这样当用户选择操作与该列相关的数据时,必要时,他们将看到基于该字段的信息,这些信息存储在会话中)。
是否有我需要使用或创建的属性?
我已经成功地在元数据中创建了一个扩展属性:
public partial class MyTable { [ScaffoldColumn(true)] public string MyValueFromSession { get { return Session["theAttribute"].ToString(); } } }
然后您可以在 MyTable 元数据中指定一个名为 MyValueFromSession 的新列。 希望这可以帮助。