前台代码 <uc3:BlowUpPicture ID="BlowUpPicture1" runat="server" StoreID="Store1" Callback="insertImage" Folder="~/DATA/images/" />
后台代码
this.ImgT.ImageUrl = "~/DATA/images/" + Convert.ToString(ds.Tables[0].Rows[0]["IMG"]);
idno = this.tbxIdNo.Text;
Session["idno"] = idno;
this.BlowUpPicture1.Folder = "~/DATA/images/"+idno; private List<ImageInfo> GetImages(string path)
{
string serverPath = Server.MapPath(path);
if (!Directory.Exists(serverPath))
{
Directory.CreateDirectory(serverPath);
}
// 保存图片到服务器上
try
{
String path = Path.Combine(Server.MapPath("~/DATA/images/"),this.tbxIdNo.Text);
if (!Directory.Exists(path))
{
Directory.CreateDirectory(path);
}
hpf.SaveAs(Path.Combine(path, Filename));
this.hiddenIMG.Value = Filename;
}看看有什么问题,我不知道路径怎么改,
后台代码
this.ImgT.ImageUrl = "~/DATA/images/" + Convert.ToString(ds.Tables[0].Rows[0]["IMG"]);
idno = this.tbxIdNo.Text;
Session["idno"] = idno;
this.BlowUpPicture1.Folder = "~/DATA/images/"+idno; private List<ImageInfo> GetImages(string path)
{
string serverPath = Server.MapPath(path);
if (!Directory.Exists(serverPath))
{
Directory.CreateDirectory(serverPath);
}
// 保存图片到服务器上
try
{
String path = Path.Combine(Server.MapPath("~/DATA/images/"),this.tbxIdNo.Text);
if (!Directory.Exists(path))
{
Directory.CreateDirectory(path);
}
hpf.SaveAs(Path.Combine(path, Filename));
this.hiddenIMG.Value = Filename;
}看看有什么问题,我不知道路径怎么改,
所以我建议使用相对路径你现在使用的也是相对路径 但是没有显示的原因你可以 查看网页的源码 然后 贴出来到浏览器的地址栏区去访问 看看能不能访问的得到
在路径处打断点。。看路径出来的是什么