【发布时间】:2015-04-02 14:41:22
【问题描述】:
Gridview RowDataBound 事件我正在使用直接强制转换的控件中读取...
Dim transTB As TextBox = DirectCast(e.Row.Cells(3).Controls(1), TextBox)
Dim engLabel As Label = DirectCast(e.Row.Cells(2).Controls(1), Label)
在第二列,单元格 2 中,我添加了另外两个控件,另一个标签和文本框,仅在编辑模式下。
Dim newTB6 As TextBox = DirectCast(e.Row.Cells(2).Controls(2), TextBox)
我正在尝试使用上述演员阵容进入新的文本框 newTB6。我找不到它。
这是内联...
<EditItemTemplate>
<asp:Label ID="Label1" runat="server" Text='<%# EncodeIT(Eval("shrt_Txt")) %>'></asp:Label><br /><br />
<asp:Label ID="Label13" runat="server" Text="Train"></asp:Label>
<br />
<asp:TextBox ID="TextBox6" runat="server" Width="400px" Text='<%# Eval("lan_Strg") %>'></asp:TextBox>
</EditItemTemplate>
很好奇如何找到文本框。
【问题讨论】: