日期:2014-05-18 浏览次数:20423 次
<%@ Page Language="C#" AutoEventWireup="true" enableEventValidation="false" CodeFile="DataList.aspx.cs" Inherits="DataList" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" > <head runat="server"> <title>无标题页</title> </head> <body> <form id="form1" runat="server"> <div> <asp:DataList ID="DataList1" runat="server" OnItemDataBound="DataList1_ItemDataBound"> <ItemTemplate> <asp:TextBox ID='txt' runat="server" Text='<%# Eval("学生姓名") %>'></asp:TextBox> <asp:Button ID="CommandBtn" runat="server" Text="Button" OnClick="CommandBtn_Click" /> </ItemTemplate> </asp:DataList></div> </form> </body> </html>
------解决方案--------------------
同2楼
或google 事件冒泡
或 http://www.cnblogs.com/huobazi/archive/2006/04/08/TwoDropDownListInDataGridAndBubbleEvent.html
------解决方案--------------------
1楼正解