Nurul Alam
Nurul Alam

Reputation: 352

How to add databind into hyperLink of aspx page

View Bookings

I want something like

<pre>
<asp:HyperLink ID="h" runat="server" NavigateUrl='~/test.aspx?id=Bind("instructor_id")'> View Bookings</asp:HyperLink>
</pre>

Upvotes: 1

Views: 44

Answers (1)

Martin Parenteau
Martin Parenteau

Reputation: 73731

You can do it this way:

NavigateUrl='<%# "~/test.aspx?id=" + Eval("instructor_id") %>'

Upvotes: 2

Related Questions