0

我正在尝试将图像保存到本地路径(我不会在服务器上部署我的项目)并且我很难将手指放在文件上传的正确路径上:

Protected Sub htmleditorextender_ImageUploadComplete(sender As Object, e As AjaxControlToolkit.AjaxFileUploadEventArgs)
    Dim fullpath = Request.MapPath("~/img/ar") & "/" & e.FileName
    TextBox1_HtmlEditorExtender.AjaxFileUpload.SaveAs(fullpath)
    e.PostedUrl = fullpath
End Sub

这不起作用,并且没有图像上传到所述文件夹。怎么了?

4

1 回答 1

1

尝试这个

Protected Sub HTMLEditorExtender_ImageUploadComplete(sender As Object, e As AjaxControlToolkit.AjaxFileUploadEventArgs)
    Dim fullpath As String = Server.MapPath("~/img/ar/") + e.FileName
    HTMLEditorExtender.AjaxFileUpload.SaveAs(fullpath)
    e.PostedUrl = Page.ResolveUrl(fullpath)
End Sub
于 2013-04-30T12:57:45.400 回答