如何在datalist asp:LinkButton 使用 Eval("ID")
时间:2011-04-01 来源:茶海
如文章标题;
.aspx页面如下:
<asp:datalist id= "Dgrid " runat= "server " OnEditCommand= "Edit_Command " GridLines= "Both ">
...
<ItemTemplate>
<asp:LinkButton id= "EditButton " Text= "Edit " CommandName= "Edit " CommandArgument='<%#Eval("ID")%>' runat= "server " />
</ItemTemplate>
</asp:datalist>
public void Edit_Command(Object sender, DataListCommandEventArgs e)
{
string id = e.CommandArgument.ToString()
...
}
相关阅读 更多 +