Call Javascript function from Gridview RowDeleting event
<p>I need to call a javascript alert from an if condition inside a gridview in the gvLocations_RowDeleting section. </p>

<p>Code is as follows:</p>

<pre><code>protected void gvLocations_RowDeleting(object sender, GridViewDeleteEventArgs e)
{
    if (CheckIfLocationExists(ID) == true)
    {
        //need to call javascript function sendmessage() here?? 
    }
}
</code></pre>

<p>I have a javascript function in the .aspx file as follows</p>

<pre><code>&lt;script type="text/javascript"&gt;
function sendmessage()
{
    alert("Area is associated with this location already");
}
&lt;/script&gt;
</code></pre>

<p>I know this is an easy move but for some reason Im having trouble. Can someone help? thanks in advance. Stack Overflow rocks!</p>
