上传图片过程中给父窗口赋值

 

string url = Server.MapPath("..\\upImg") + "\\" + System.DateTime.Now.ToString("yyMMddHHmmss") + Path.GetExtension(FileUpload1.FileName);            
                FileUpload1.SaveAs(url);
                Label1.Text = FileUpload1.PostedFile.FileName;
                Label2.Text = url;
                Response.Write("<scrīpt>opener.document.getElementById('tbPicture').value='"+Path.GetFileName(url)+"';</scrīpt>");

 
posted on 2007-04-07 22:30  上校  阅读(197)  评论(0编辑  收藏  举报