I wanted to append page Url with DataBinder.Eval value in ASP.NET hyperlink control on ASP.NET HTML source. I was trying it using many ways and also search for resources on web but I could not find any useful thing.
I thought this will help u guys to get an idea about appending two strings. Solution as follows.
You can see how I have appended these two value in NavigateUrl property.
Hope some one will get the advantage of this post.
I thought this will help u guys to get an idea about appending two strings. Solution as follows.
<asp:HyperLink ID="customerHyperLink" runat="server"
Text= '<%# DataBinder.Eval(Container.DataItem, "Name") %>' NavigateUrl='<%# "~/Pages/YourPage.aspx?id=" + DataBinder.Eval(Container.DataItem, "id") %>'></asp:HyperLink>
You can see how I have appended these two value in NavigateUrl property.
Hope some one will get the advantage of this post.
Comments