需要用asp.net幫助如何在代碼隱藏中將元素選入中繼器?
這是我的代碼:
<asp:Repeater runat="server" ID="RepeaterContents">
<ItemTemplate>
<tr>
<td valign="middle"><%#Eval("Title")%> </td>
<td class="txt"><%#Util.ExibirStatus(Eval("Active").ToString()) %></td>
<td class="txt"><a href="ContentDetail.aspx?Id=<%#Eval("ContentId")%>">Editar</a>
<asp:LinkButton runat="server" ID="**LinkButtonExcluir**" OnCommand="Excluir" OnClientClick="javascript:return(confirm('Deseja realmente excluir este conteúdo?'))" CommandArgument='<%#Eval("ContentId")%>'>Excluir</asp:LinkButton>
</td>
</tr>
</ItemTemplate>
</asp:Repeater>
和我.CS
private void EntitiesLoad(int id)
{
repository = CreateRepository<IPageRepository>();
page = repository.SelectById(id);
if (page != null && page.ParentPage != null)
{
TextBoxTitulo.Enabled = true;
}
switch (id)
{
case 10:
EscondePanels(PanelImagem, PanelMaster, PanelConteudo);
**LinkButtonExcluir**.Enabled = false;
break;
爲什麼不承認元素Asp.Net?
它的作品!多謝兄弟! :) – FelipeNascimento