문제

I've got a web page that has the following situation: I want to upload a file, but instead of using a fileupload and then a button to upload, i want a button to launch the browse for files, and when i click OK it uploads the file. I use a javascript function to launch fileupload (onclientclick of my button) but then nothing else happens, i.e, it doesn't go to the onclick on the codebehind

도움이 되었습니까?

해결책

Call a function from the OnClick call, like:

function fileUpload() {
    //your function to call the JavaScript file selection
    return true;
}

다른 팁

Place the JavaScript function in the OnClick function and then return true, passing control to the code behind.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top