Solved

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

Posted on 2007-12-03
4
1,211 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
  • 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 17

Expert Comment

by:lem2802
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 17

Accepted Solution

by:
lem2802 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Change data in datatable 8 18
Calling stored proc in EDMX 11 19
Format column on datatable 7 18
Adjust the position 3 13
Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
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…
This video discusses moving either the default database or any database to a new volume.
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

760 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

21 Experts available now in Live!

Get 1:1 Help Now