青海龙8国际乐建设、网络推广最好的公司--您身边的龙8国际乐建设专家,马上拿起电话,联系我们:0971-8235355   
青海西宁龙8国际乐建设、龙8国际乐制作公司-西宁威势电子信息服务有限公司
 
西宁威势最新龙8国际乐制做案例展示
Lastest Project
 
当前位置为:首页 >> .NET编程 >> 正文  
龙8国际乐_龙8国际娱乐电脑版_龙8国际娱城手机版

文章来源: 西宁威势电子信息服务有限公司     发布时间:2010-10-3    浏览次数:3470   

<asp:Repeater runat="server" ID="rptShowLink">
             <ItemTemplate>
                           <tr>
                                     <td align="center">
                                            <%# DataBinder.Eval(Container.DataItem, "Loge_url")%>
                                        </td>
                                        <td align="center">
                                            <%# DataBinder.Eval(Container.DataItem, "link_name")%>
                                        </td>
                                        <td align="center">
                                            <%# DataBinder.Eval(Container.DataItem, "link_url")%>
                                        </td>
                                        <td align="center">
                                            <asp:LinkButton runat="server" ID="btnUpdate" Text="修改" CommandName='<%# DataBinder.Eval(Container.DataItem, "link_id")%>'
                                                OnCommand="btnUpdate_Click" />
                                            <asp:LinkButton runat="server" ID="btnDelete" Text="删除" CommandName='<%# DataBinder.Eval(Container.DataItem, "link_id")%>'
                                                OnCommand="btnDelete_Click" OnClientClick="return confirm('确认删除吗?');" />
                                    </tr>
                                </ItemTemplate>
                                <SeparatorTemplate>
                                    <%--这是分隔线模板--%>
                                    <tr>
                                        <td colspan="4">
                                            <hr style="border-top: 1pt;" />
                                        </td>
                                    </tr>
                                </SeparatorTemplate>
                                <FooterTemplate>
                                </FooterTemplate>
                            </asp:Repeater>

//修改
    protected void btnUpdate_Click(object sender, CommandEventArgs e)
    {
        type++;
        id = Convert.ToInt32(e.CommandName);
        entity.Link link = new entity.Link();
        link = linkdao.SelectById(id);
        this.name.Text = link.link_name.ToString();
        this.address.Text = link.link_url.ToString();
        this.logo.Text = link.Loge_url.ToString();
        this.ddlType.ClearSelection();
        this.ddlType.Items.FindByText((new LinkTypeDao().SelectNameByid(link.type_id)).type_name.ToString()).Selected = true;
        this.HiddenField1.Value = id.ToString();
    }


    //删除
    protected void btnDelete_Click(object sender, CommandEventArgs e)
    {
        int Id = Convert.ToInt32(e.CommandName);
         ID都得到了,删除吧
    }


评论列表
正在加载评论……
  
评论   
呢  称:
验证码:
若看不清请点击更换!
内  容:
 
 
  在线洽谈咨询:
点击这里,在线洽谈   点击这里,在线洽谈   点击这里,在线洽谈
乘车路线    汇款方式   加盟合作  人才招聘
 
公司地址:青海省西宁市西关大街73号(三二四部队招行所四楼)     青ICP备13000578号-1 公安机关备案号:63010402000123    
QQ:147399120    mail:lostlove000@163.com    电话: 13897410341    邮编:810000
© Copyright( 2008-2009) QhWins.Com All Rights Reserved    版权所有:西宁威势电子信息服务有限公司 未经书面制授权,请勿随意转载!