使用fileUpload控件成功上传图片,却不能显示在image控件上,求大神解答,或者有其他解决方案的请发代码。 20
protectedvoidButton4_Click(objectsender,EventArgse){Stringfilename=FileUpload1.FileNa...
protected void Button4_Click(object sender, EventArgs e)
{
String filename = FileUpload1.FileName.ToString();
string filepath = Server.MapPath("~/image/");
FileUpload1.SaveAs(filepath + "\\" + filename);
this.Image1.ImageUrl = "~/image/"+filename.ToString(); 展开
{
String filename = FileUpload1.FileName.ToString();
string filepath = Server.MapPath("~/image/");
FileUpload1.SaveAs(filepath + "\\" + filename);
this.Image1.ImageUrl = "~/image/"+filename.ToString(); 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询