我想获得一个asp:文字工作,但显然我做错了什么,因为我正在一个ASP文字工作不
对象Referece未设置为对象的实例
错误
这是我的代码:
在ASCX页:
<span class="span1">
<asp:Literal ID="litFile" runat="server"></asp:Literal>
<strong><asp:Literal ID="litFile2" runat="server"></asp:Literal></strong>
</span>
和
在ascx.cs页:
protected void _ItemBound(object sender, RepeaterItemEventArgs e)
{
((Literal)e.Item.FindControl("litFile")).Text = "a";
}
任何想法吗?
C
你能告诉我们更多的代码吗?这是在网格中的文字?你想要做什么事件处理程序? – kevev22 2011-02-02 15:52:27