AjaxFileUpload服务器事件未触发 [英] AjaxFileUpload server events not firing

查看:135
本文介绍了AjaxFileUpload服务器事件未触发的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个asp.net网站应用程序,我想要

使用AjaxControlToolkit执行多个文件上传

文件上传组件,但是OnUploadStart和OnUploadComplete
上传文件时,
方法不会触发。并且只上传

第一个文件,然后停止。





我设置断点到事件,但他们没有解雇。

i也用过,我添加了enctype =multipart / form-datamethod =post

(根据这个话题)

web.config文件的标签和HTTP处理程序,但它仍然无法正常工作。什么是

我做错了?请帮助我。

解决方案

您可以使用telerik rad控件轻松开发应用程序。

AjaxFileUpload控件使用名为AjaxFileUploadHandler的HTTP处理程序.axd此处理程序具有AjaxControlToolkit.AjaxFileUploadHandler类型。您必须将此处理程序添加到Web.Config文件中才能使AjaxFileUpload控件正常工作。



这是您必须添加的Web.Config配置:



 <   httphandlers  >  
< add 动词 = * path = AjaxFileUploadHandler.axd >
type = AjaxControlToolkit.AjaxFileUploadHandler,
AjaxControlToolkit/>
< / add > < / httphandlers >



对于IIS7:



 <  验证    validateintegratedmodeconfiguration   =  false    /  >  
< < span class =code-leadattribute>处理程序 >
< add name = AjaxFileUploadHandler 动词 = * >
path =AjaxFileUploadHandler.axd
type =AjaxControlToolkit.AjaxFileUploadHandler,
AjaxControlToolkit/>
< / add > < / handlers >


I have an asp.net web site application where I want
to perform multiple file upload using AjaxControlToolkit
file upload component,but OnUploadStart and OnUploadComplete
methods does not fire when I upload files. And also only the
first file is uploaded and then it stops.


I set breakpoints to the events, but they are not firing.
i also used,I added enctype="multipart/form-data" method="post"
(according to this topic) to the tag and also HTTP handler to
web.config file, but it still does not work properly. What am
I doing wrong? Please help me.

解决方案

You can use telerik rad controls for easy developing the applications.
The AjaxFileUpload control uses an HTTP Handler named AjaxFileUploadHandler.axd This handler has the type AjaxControlToolkit.AjaxFileUploadHandler. You must add this handler to your Web.Config file in order for the AjaxFileUpload control to work.

Here's the Web.Config configuration that you must add:

<httphandlers>
    <add verb="*" path="AjaxFileUploadHandler.axd">
      type="AjaxControlToolkit.AjaxFileUploadHandler, 
      AjaxControlToolkit"/>
</add></httphandlers>


For IIS7:

<validation validateintegratedmodeconfiguration="false" />
<handlers>
    <add name="AjaxFileUploadHandler" verb="*">
      path="AjaxFileUploadHandler.axd"
      type="AjaxControlToolkit.AjaxFileUploadHandler, 
      AjaxControlToolkit"/>
</add></handlers>


这篇关于AjaxFileUpload服务器事件未触发的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆