navigateURL query string

Hello, I have the following navigateURL querystring that works great:
NavigateUrl='<%# Eval("ArticleId", "~/search.aspx?ArticleId={0}&type=" & Request.QueryString("ArticleId")) %>' Text='<%# Eval("Title") %>'

I need to add an additional querystring value "SearchText" to the above. The value for "SearchText" comes from a label on the same page called lblSearchText.

How can this be accomplished
Who is Participating?
wht1986Connect With a Mentor Commented:
when i have a complicated binding to do, sometimes its just easier to call a page lvel method to return the string i want. Here the hyperlink in a template column gets its navigateurl proeprty filled by a page method called GetMyNavigateUrl.

The values in the method are obviously based on my sql data source, so you to tweak that aspect of it

<asp:HyperLink ID="hl1" runat="server" NavigateUrl="<%# GetMyNavigateUrl(Container.DataItem) %>" Text='<%# Eval("PrimaryID") %>' />
public string GetMyNavigateUrl(object o)
    DataRowView drv = (DataRowView)o;
    DataSet1.TestTableRow ttr = (DataSet1.TestTableRow)drv.Row;
    return string.Format("~/search.aspx?ArticleId={0}&type={1}&lbl={2}",

Open in new window

did that help gogetsome?
gogetsomeAuthor Commented:
Yes, thank you!
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.