Javascript confirmation or other type of confirmation
<p>Hello I have a c# application that has a button "Submit" and in the code behind i am evaluating some stuff when it is clicked. But now, I have a FileUpload in the same page, the one that comes with the standard "Browse" button which I can not code against (and company rules, can not change it to a regular button).</p>

<p>So the thing is that when the "Submit" button is clicked, I still want to evaluate what I need to evaluate but I also want a Javascript or any other type of confirmation that prompts the user if the image file selected in the upload has the same name as the previous one then it should pop up "This image file already exists, do you want to replace it?.</p>

<p>But now, see how I want to use the back end On_Submit(Object o, EventArgs e) and also be able to ask the question IF anf only IF the image chosen has the same name as the previous one.</p>

<p>Now, I can check this in the same On_Submit button whether the new file name is the same as the old one but how can I do this? from within the On_Submit event? something like</p>

<pre><code>public void On_Submit(Object o, EventArgs e)
{
  //using pseudo code
   if(oldImagename == newImageName)
          pop message to alert if replacement
          do other stuff here
   else
        do other stuff here
}
</code></pre>

<p>Thank you guys</p>
