日期:2014-05-17 浏览次数:20441 次
string savePath = Server.MapPath("//Photo//"); //string savePath = Server.MapPath("/Photo/"); savePath += DateTime.Now.ToString("yyMMdd")+DateTime.Now.ToString("HHmmss") + filename; string sql_add = "insert into Photo(PhotoPath)values('" + savePath + "')";
<asp:GridView ID="GridView1" runat="server" AllowPaging="True" AutoGenerateColumns="False"> <columns> <asp:ImageField DataImageUrlField="PhotoPath" HeaderText="缩略图"> </columns> </asp:GridView>