Answer the question
In order to leave comments, you need to log in
How to download a file asynchronously?
Am I doing it right?
The form
<asp:FileUpload ID="fileUploader" runat="server" ClientIDMode="static" AllowMultiple="true" onchange="$('#loadGeom').click();" />
<asp:Button runat="server" ID="loadGeom" Text="Загрузить файл" ClientIDMode="static" OnClick="loadGeom_OnClick" Style = " display : none" UseSubmitBehavior="False"/>
<asp:Label ID="Label1" runat="server"></asp:Label>
$("#fileUploader").click(function () {
if (this.value != '') {
document.getElementById("<%=loadGeom.ClientID %>").click();
$.ajax({
url: "~/forms/LandLayout/LandLayoutE.aspx",
type: "POST",
contentType: "application/json; charset=utf-8",
async: true,
dataType: "json"
});
}
});
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question