【发布时间】:2014-10-05 03:02:02
【问题描述】:
从我在 html 列表(表)中加载数据的代码中: 平均售价
<table id="tblClientes" class="display" cellspacing="0" width="100%">
<thead>
<tr>
<th>Nombre</th>
<th>Razón Social</th>
<th>Teléfono</th>
<th>Email</th>
<th></th>
<th></th>
</tr>
</thead>
<tbody>
<asp:Literal runat="server" ID="tableData"></asp:Literal>
</tbody>
和.CS(代码隐藏)
tableData.Text += "<tr>";
tableData.Text += "<td>" + cliente.Nombre + "</td>";
tableData.Text += "<td>" + cliente.RazonSocial + "</td>";
tableData.Text += "<td>" + cliente.Telefono + "</td>";
tableData.Text += "<td>" + cliente.Email + "</td>";
tableData.Text += "<td><a href='#' runat='server' onserverclick='btnCargarDatosCliente_Click' data-toggle='modal' data-target='#ventanaEmergente' id='btnCargarDatosCliente_" + cliente.Id.ToString() + "'>Editar</a></td>";
tableData.Text += "<td><input type='button' data-toggle='modal' data-target='#ventanaAdvertencia' id='btnEliminarCliente_" + cliente.Id.ToString() + " value='Borrar' runat='server'/>Elimiar</td>";
tableData.Text += "</tr>";
onserverclick='btnCargarDatosCliente_Click' 不调用事件。我确实尝试过 onclick,但还是一样。
有人知道我做错了吗?
【问题讨论】: