日期:2014-05-17  浏览次数:20448 次

DataList,DropDownList,修改

DataList在编辑时,根据ID绑定DropDownList,然后修改

<asp:DataList ID="repList" runat="server" Width="98%" 
           onitemcommand="repList_ItemCommand" DataKeyField="CART_ID"
           oncancelcommand="repList_CancelCommand" oneditcommand="repList_EditCommand" 
           onupdatecommand="repList_UpdateCommand">
           <HeaderTemplate>
           <table width="98%" border="0" align="center" cellpadding="0" cellspacing="0" class="cpborder">
            <tr>
               <td width="58%" align="center" background="../../images/index_25.jpg" height="28">商品信息</td>
               <td width="18%" align="center" background="../../images/index_25.jpg">购买价格</td>
               <td width="8%"  align="center" background="../../images/index_25.jpg">数量</td>
               <td width="16%" align="center" background="../../images/index_25.jpg">操作</td>
            </tr>
           </HeaderTemplate>
           <ItemTemplate>
           
               <tr>
                 <td height="90" align="center" width="58%">
                    <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
                      <tr>
                         <td width="35%" rowspan="2" align="center">
                          <img width="46px" height="47px" class="cpborder" src="../../UpLoadPic/ProductPic/<%# Eval("PIC_SRC")%>">
                         </td>
                         <td width="65%" align="left">
                           <%# Eval("NAME")%>