0
내 이미지를 업로드 할 수없는 이유는 무엇입니까? 나는이 오류가 누군가의 도움이, 난 정말 폴더의 web.config에서 일주일하시기 바랍니다Ajaxfile 업로드 및 이미지
If Page.IsPostBack = False Then
' Getting the File Name
Dim filename As String = e.FileName
' Setting the path to upload Images
AjaxFileUpload1.SaveAs(Server.MapPath("images/") & filename)
' Storing the relative path to store into images
Dim Imagepath As String = "~/Seller/images/" & filename
Dim conss As New SqlConnection(_start)
conss.Open()
Dim sql1 As String = "INSERT INTO Image(Image,ItemID) VALUES (@image,@item)"
Dim myCommand1 = New SqlCommand(sql1, conss)
myCommand1.Parameters.AddWithValue("@image", Imagepath)
myCommand1.Parameters.AddWithValue("@item", dbItem.SelectedValue)
myCommand1.ExecuteNonQuery()
Response.Redirect("ItemView.aspx")
<div>
<asp:Label ID="Label1" runat="server" Text="Select Auction:"></asp:Label> <asp:UpdatePanel ID="UpdatePanel1" runat="server"><ContentTemplate><asp:DropDownList ID="dbItem" AutoPostBack="true" DataValueField="ItemID" DataTextField="Name"
runat="server" >
</asp:DropDownList></ContentTemplate></asp:UpdatePanel>
<asp:Label runat="server" ID="myThrobber" Style="display: none;"></asp:Label>
<asp:AjaxFileUpload ID="AjaxFileUpload1" ThrobberID="myThrobber" MaximumNumberOfFiles="4" AllowedFileTypes="jpg,jpeg" runat="server" />
</div>
수 "오류"라는 단어 이외의 다른 오류에 대한 정보가 더 있습니까? 서버 측 코드에 예외가 있습니까? HTTP 응답의 특정 오류? JavaScript 코드에 오류가 있습니까? 여기에 약간의 디버깅이 필요합니다. – David
AjaxFileUpload에 대해 이야기했지만 코드를 배웠습니다 ... 컨트롤이 필요한 컨트롤에 문제가 있다면! – Liath
나는 코드를 업데이트합니다. @Liath – user3287068