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

Posted on 2007-12-03
Medium Priority
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:Howard Katz
  • 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 18

Expert Comment

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

Author Comment

by:Howard Katz
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 18

Accepted Solution

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

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

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.

Join & Write a Comment

More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
In real business world data are crucial and sometimes data are shared among different information systems. Hence, an agreeable file transfer protocol need to be established.
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
From store locators to asset tracking and route optimization, learn how leading companies are using Google Maps APIs throughout the customer journey to increase checkout conversions, boost user engagement, and optimize order fulfillment. Powered …

587 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