使用声明性数据绑定ASP.NET进行评估 [英] Eval with declarative data bound ASP.NET

查看:102
本文介绍了使用声明性数据绑定ASP.NET进行评估的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在尝试使用声明性数据绑定的ASP.NET,并且挣扎着在幕后的魔法。

I have been trying to use declarative data bound ASP.NET, and struggling with the "magic" that goes on behind the scenes.

我该怎么做这在ASP.Net 2.0中工作。这是在一个数据绑定 FormView 控件内。

How do I do get this to work in ASP.Net 2.0. This is inside a data bound FormView control.

<asp:Label ID="RecipientsLabel" runat="server" 
    Text='<%# String.Join("; ", Eval("HtmlEncodedRecipients")) %>'>
</asp:Label>

注意: HtmlEncodedRecipients 是一个列表< string> 属性

我收到此错误:


最好的重载方法匹配
'string.Join(string,string [])'有
一些无效参数

The best overloaded method match for 'string.Join(string, string[])' has some invalid arguments


推荐答案

尝试将 Eval(HtmlEncodedRecipients)列出并调用 .ToArray()

这篇关于使用声明性数据绑定ASP.NET进行评估的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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