Managing LinkButton with Javascript?
<p>I have a <code>LinkButton</code> called "Exit Chat" on the view.I embed <code>javascript</code> code into <code>OnClientClink=javascript:confirm('Are you sure you want to end the session?')</code>.However,I can't manage dialog box</p>

<p>When user click the OK button,view should be terminated.How can I do this?</p>

<pre><code>&lt;asp:LinkButton ID="LinkButton2" runat="server" Font-
    Bold="False" Font-Underline="False" 
    OnClientClick="javascript:confirm('Are you sure you want to end the session?')"
    ViewStateMode="Enabled" OnClick="LinkButton2_Click1" Text="Exit Chat"&gt;
&lt;/asp:LinkButton&gt;
</code></pre>

<p>I wrote this code part but didnt work :(</p>

<pre><code>if (LinkButton2.CommandName=="OK")
{
    MultiView1.ActiveViewIndex = -1;
}
else if(LinkButton2.CommandName=="Cancel")
{
    MultiView1.ActiveViewIndex = 1;
}
</code></pre>
