通过Kendo,Webservice上传文件

时间:2015-04-06 07:44:24

标签: c# web-services kendo-ui

我想通过kendoupload上传文件并使用webservice接收文件。我的文件可能是一个非常大的文件。 这是我的aspx:

<input type="file" name="File1" id="File1"   />
<input type="submit" value="Submit" class ="k-button" onclick="beginUpload()"/>

这是我的javascript:

  function beginUpload()
  {
       $("#File1").kendoUpload({
           async: {
              saveUrl: 'GetFile.asmx/ReceiveFile',
              autoUpload: true
          },
          multiple: false
      });
  }

最后这是我的网络服务:

 [WebMethod]
    public  string ReceiveFile(string s)
    {

       return "Hello World!";
    }

1 个答案:

答案 0 :(得分:0)

不支持将文件上传到ASMX(不是通过Kendo UI,而是一般)。

相关问题