I am fairly new to web forms. I am using custom file upload component. I would like to upload file in a specific folder of my local machine and I have written code in the Default.aspx.cs
file instead of Default.ahsx
page. The file which I upload is uploaded successfully(UI level only) and I'm getting wondered, I cannot able to get the file in code behind (i.e., in aspx.cs file). Breakpoints also not hit. In the Network tab of browser, status code is returned as 200.
Here is what I've tried.
My aspx.cs file
public static object Save(HttpContext context)
{
// Debugger is not hitting
<Code to save file>
return "";
}
Aspx file
<div id="app">
<custom-uploader :async-settings="path"></custom-uploader>
</div>
<script>
Vue.use(customUploader.UploaderPlugin);
new Vue({
el: '#app',
data: function () {
return {
path: {
saveUrl: 'Default.aspx/Save',
removeUrl: 'https://aspnetmvc.syncfusion.com/services/api/uploadbox/Remove'
}
}
}
});
</script>
Any help would be greatly appreciated.