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.
我有以下代码。
在未将“邮件”列添加到数据集的情况下,我会收到错误消息。
如果数据集中不存在“邮件”列,我将如何编码以获得默认值?
<a href="mailto:<%# DataBinder.Eval(Container.DataItem, "mail") %>
<a href="mailto:<%# DataBinder.Eval(Container.DataItem, "mail") != null ? DataBinder.Eval(Container.DataItem, "mail") : "default@default.com"%>