JavaScript in gridview HyperLinkField NavigateUrl
<p>I have a List of Items which is binded to GridView:</p>

<pre><code>class Item
    {
        public string CategoryName { get; set; }
        public int CategoryID { get; set; }
    }

&lt;asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False"&gt;                 
            &lt;Columns&gt;
                &lt;asp:BoundField DataField="CategoryID" /&gt;
                &lt;asp:HyperLinkField DataTextField="CategoryName" NavigateUrl="javascript:alert('Hello World');"/&gt;               
            &lt;/Columns&gt;
        &lt;/asp:GridView&gt;
</code></pre>

<p>All that I need to show the CategoryName in the alert window instead of 'Hello world'.</p>
