syntax for hyperlink field in a grid view with 3 querystrings coming from Session variables

Posted on 2007-12-03
Last Modified: 2013-11-07
Hello Experts,

I need the sytax for the navigateURL attribute in a asp:hyperlink control
      asp:hyperlink  text="<%# Bind("quote_number"%>" navigateURL=applicant.aspx?qn="     "
The first Item is the value in the text=="<%# Bind("quote_number"%>"
the next 2 items are in session variables.
Question by:katzhoward
  • 2

Expert Comment

ID: 20398297
You appear to have syntax errors with the text attribute as well. Try something like this:

<asp:hyperlink text='<%# Bind("quote_number") %>' navigateUrl = '<%# String.Format("applicant.aspx?qn={0}&other={1}", Bind("quote_number"), Session["someVar"] ) %>' runat='server'>

LVL 17

Expert Comment

by:Elvio Lujan
ID: 20398309
      <asp:hyperlink  text='<%# Bind("quote_number")%>' navigateURL='<%# "applicant.aspx?qn=" & session("varName") %>'></asp:hyperlink>

Author Comment

ID: 20398620
I need to have the qn be equal to the value that is in text attribute.  

After that, I have 2 more query strings that are coming from session variables.
Chumad, when trying to build your solution, i got errors on the Bind in the navigateURL part.

LVL 17

Accepted Solution

Elvio Lujan earned 500 total points
ID: 20398685
      <asp:hyperlink  text='<%# Bind("quote_number")%>' navigateURL='<%# "applicant.aspx?qn=" & Bind("quote_number") & "par2=" & session("par2")%>'></asp:hyperlink>

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Internet Business Fax to Email Made Easy - With eFax Corporate (, you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

896 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now