【问题标题】:does not have a public property named 'Text'没有名为“文本”的公共属性
【发布时间】:2014-11-21 07:17:15
【问题描述】:

这是我的代码:

 <asp:MultiView ID="mltvAddress" runat="server" Text='<%# Eval("Address") %>' />

这是我的错误:

Type 'System.Web.UI.WebControls.MultiView' does not have a public property named 'Text'.

【问题讨论】:

  • 你想做什么?错误一清二楚。

标签: asp.net


【解决方案1】:

您收到此错误消息是因为在 MultiView 控件中没有像 Text 这样的属性。实际上,根据MSDN,MultiView 充当其他控件和标记的容器。

我不知道您的要求是什么,但如果必须使用 MultiView,则在其中添加控件,如下所示:-

<asp:MultiView ID="MultiView1" runat="server" ActiveViewIndex="0">
    <asp:View ID="View1" runat="server">
        <asp:Label ID="lblAddress" runat="server" Text="Address"></asp:Label>
    </asp:View>
</asp:MultiView>

【讨论】:

猜你喜欢
  • 2011-10-16
  • 2012-07-24
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2011-08-26
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多