0
button
은 Datalist
위에 있습니다. 사용자가 검색을 수행 할 때마다 반환되는 레코드는 Datalist
에 바인딩됩니다. 버튼의ASP.NET VB는 데이터 목록을 편집 모드로 설정합니다.
코드 : DataList에 대한 <asp:Button ID="Button1" runat="server" Text="Edit" CommandName="edit"/>
코드 : 된 .vb 파일에서
<asp:DataList ID="UserMatrixDataList" runat="server" RepeatColumns="1" CellSpacing="6" RepeatLayout="Table" BorderWidth="5">
<ItemTemplate>
<table class="table">
<col width="130">
<col width="800">
<tr>
<td>
<strong>Level</strong>
</td>
<td>
<asp:Label ID="lblLevel" runat="server" Text='<%# Eval("Level")%>'></asp:Label>
</td>
</tr>
</table>
</ItemTemplate>
<EditItemTemplate>
<table class="table">
col width="130">
<col width="800">
<tr>
<td>
<strong>Level</strong>
</td>
<td>
<asp:TextBox ID="txtLevel" runat="server" Text='<%# Eval("Level")%>'></asp:TextBox>
</td>
</tr>
</table>
</EditItemTemplate>
</asp:DataList>
, 내가 가지고
는Protected Sub UserMatrixDataList_EditCommand(source As Object, e As DataListCommandEventArgs)
For i = 0 To UserMatrixDataList.Items.Count
UserMatrixDataList.EditItemIndex = e.Item.ItemIndex
UserMatrixDataList.DataBind()
Next
End Sub
그러나 아무것도 클릭 후 반응이 없습니다 button
. 내가 어디에서 잘못했는지 알기나 해? 아니면 그러한 방법을 구현할 수 있습니까?
귀하의 조언에 감사드립니다. 선생님! –