I have one file upload control in my aspx page and need to upload the file without clicking on a button. As soon as the user selects the file from FileUpload Control, file needs to be uploaded into the server.
我的aspx页面中有一个文件上传控件,需要上传文件而不点击按钮。一旦用户从FileUpload Control中选择文件,就需要将文件上载到服务器中。
I have to call a Codebehind method from the JavaScript, I tried using $("#btnUpload").click()
and __doPostBack('btnBulkUpload', 'OnClick');
but result is nothing.
我必须从JavaScript调用Codebehind方法,我尝试使用$(“#btnUpload”)。click()和__doPostBack('btnBulkUpload','OnClick');但结果什么都没有。
Can anybody suggest me the solution?
谁能建议我解决方案?
1 个解决方案
#1
Yes, I got the solution...
I had set the button's Visible property to False that's the reason it was not working. Now I changed the Visible="False"
to Visible="True"
and it's working fine.
是的,我得到了解决方案......我已将按钮的Visible属性设置为False,这就是它无法正常工作的原因。现在我将Visible =“False”改为Visible =“True”,它运行正常。
#1
Yes, I got the solution...
I had set the button's Visible property to False that's the reason it was not working. Now I changed the Visible="False"
to Visible="True"
and it's working fine.
是的,我得到了解决方案......我已将按钮的Visible属性设置为False,这就是它无法正常工作的原因。现在我将Visible =“False”改为Visible =“True”,它运行正常。