在usercontrol中使用AsyncFileUpload上载文件 [英] Upload File using AsyncFileUpload with in usercontrol

查看:71
本文介绍了在usercontrol中使用AsyncFileUpload上载文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要在用户控件中使用AsyncFileUpload上传文件。



我尝试了样本,它正在我的一边工作项目。但是在项目中没有方法是触发,甚至javascript函数OnClientUploadStarteddosnt fire。



我为它编写函数并调用

I need to upload file using AsyncFileUpload within the usercontrol.

I have tried with sample, it is working out side from my project. but with in the project none the method is firing , even javascript function "OnClientUploadStarted" dosnt fire.

I write function for it and call as

OnClientUploadStarted="myStartFunction"





然后插入警报,即使它很有效。





i使用



then insert the alert ,even it dosent work.


i used

<form  enctype="multipart/form-data" method="POST"></form>









没有任何gona工作。



您的帮助非常感谢



also

none of gona work.

your help is kindly appreciate

推荐答案

这里唯一的调用是你需要检查你的JavaScript代码。好像你要阻止表单提交,可能是因为



The only call here is that you need to check your JavaScript code. It seems like you're preventing the form to be submitting, it might be because of

return false;





在块内你正在捕捉表单提交事件,或者你正试图阻止这样的事件





inside the block where you're capturing the form submit event, or you're trying to prevent it like this

event.preventDefault();





..最后一个出价是您正在通过ClientSide函数捕获事件,并且您的代码中存在一些错误导致什么都没发生。我建议您使用F12打开控制台,然后检查按下按钮时会发生什么。它肯定会告诉你表单提交过程中是否有任何错误。



.. the last bid would be that you're capturing the event by ClientSide function and there is some error in your code which is causing nothing to happen at all. I would advise you to open the Console, using F12 and then checking what happens when you press the button. It will surely tell you if there is any kind of error in the form submission process.


这篇关于在usercontrol中使用AsyncFileUpload上载文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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