I'm currently using an ASP.NET File Upload control. This works great, but I'd like to remove the current Upload
button and put its logic into the Browse...
button instead.
Is there a way to overload the Browse...
button's logic?
Currently:
I'd like to have this:
When the user clicks the Open
button in the File Upload box, the Upload
buttons' logic fires:
Upon clicking Open
, the following code triggers in C# Code behind.
protected void override btnSomeOverriddenControl_Click(object sender, EventArgs e)
{
if (multipleFile.HasFiles)
{
foreach (var file in multipleFile.PostedFiles)
{
//do stuff
}
}
}