日期:2014-05-17 浏览次数:20484 次
<asp:TemplateField HeaderText="图片" SortExpression="Img"> <ItemTemplate> <%# Eval("Img")%> </ItemTemplate> <EditItemTemplate> <asp:HiddenField ID="hdfImg" runat="server" Value='<%# Eval("Img")%>' /> <input type="file" runat="server" id="UpFile" style="width: 132px;" /> </EditItemTemplate> </asp:TemplateField>
string upFile = ((HtmlInputFile)gdvData.Rows[e.RowIndex].FindControl("UpFile")).Value;