Call C# Function Inside asp:HyperLink NavigateUrl
<p>I have a function that is called getUserID and I would like to pass the user ID via NavigateUrl within asp:HyperLink.</p>

<p>This is my hyperlink: </p>

<pre><code>            &lt;asp:HyperLink ID="lnkMyAccount" Text="My Account" 
                NavigateUrl="~/Users/View.aspx" style="color:White" CssClass="myAreaLink" 
                Runat="server" Font-Size="Small" /&gt;
                &amp;nbsp;|&amp;nbsp;
</code></pre>

<p>I tried this but it did not work: </p>

<pre><code>            &lt;asp:HyperLink ID="lnkMyAccount" Text="My Account" 
                NavigateUrl='&lt;%# "~/Users/View.aspx" + CPDManagement._code.SearchSelection.getUserID().Tables[0].Rows[0]["u_ID"].ToString() %&gt; style="color:White" CssClass="myAreaLink" 
                Runat="server" Font-Size="Small" /&gt;
                &amp;nbsp;|&amp;nbsp;
</code></pre>
