Solved

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

Posted on 2007-12-03
4
1,216 Views
Last Modified: 2013-11-07
Hello Experts,

I need the sytax for the navigateURL attribute in a asp:hyperlink control
<asp:TemplateField>
   <itemtemplate>
      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.
Thanks
Howard
0
Comment
Question by:katzhoward
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 8

Expert Comment

by:Chumad
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'>

0
 
LVL 18

Expert Comment

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

Author Comment

by:katzhoward
ID: 20398620
lem2802,
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.

0
 
LVL 18

Accepted Solution

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

Featured Post

MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
asp.net repeater 2 35
EF5 How do I stop pre-compiled views? 8 51
Why am I losing my session variable value 11 38
Need Help With GDI+ in VB.Net 8 39
Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…

739 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