Calling a Javascript function within C#
<p>I am trying to pop something based on a condition... but it is not working... and I am kind of a newbie at this so I appreciate the help</p>

<pre><code>if (myFileName == OldFileName)
                {
                    btnSubmit.Attributes["OnClick"] = "return confirm('This file already exists, do you want to replace it?');";
                }
</code></pre>

<p>This is not being call for some reason.. here is the asp code</p>

<pre><code>asp:Button class="Button" ID="btnSubmit" CausesValidation="True" Text="SUBMIT" runat="server"
            OnClick="btnSubmit_Click"&gt;&lt;/asp:Button&gt;
</code></pre>
