Adding confirm javascript to asp.net generated links
<p>I have a number of buttons generated on the server, each of which is unique.</p>

<p>I want to be able to have a popup to ask if the user definitely wants to click, and then for it to follow through with the postback.</p>

<p>The generated button code is:</p>

<pre><code>&lt;a id="ctl00_ContentPlaceHolder1_btnID9994"
   href="javascript:__doPostBack('ctl00$ContentPlaceHolder1$btnID9994','')"&gt;
    &lt;img src="mt_locked.gif"/&gt;
&lt;/a&gt;

&lt;a id="ctl00_ContentPlaceHolder1_btnID9995"
   href="javascript:__doPostBack('ctl00$ContentPlaceHolder1$btnID9995','')"&gt;
    &lt;img src="mt_locked.gif"/&gt;
&lt;/a&gt;
</code></pre>

<p>The buttons are generated using this method:</p>

<pre><code> objBtn.ID = "btnID" &amp; room_id.ToString
 objBtn.CommandArgument = "Unblock"
 AddHandler objBtn.Click, AddressOf btnClicked
</code></pre>

<p>Is there anyway I can add the Confirm javascript code while generating the buttons above, so it will be rendered somewhere in here:</p>

<pre><code>href="javascript:***confirm code here somewhere - if ok then continue to:... __doPostBack('ctl00
</code></pre>

<p>Thanks for any help,</p>

<p>Mark</p>
