Link to home
Start Free TrialLog in
Avatar of Howard Katz
Howard KatzFlag for United States of America

asked on

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

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
Avatar of Chumad
Chumad

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'>

Avatar of Elvio Lujan
<asp:TemplateField>
   <itemtemplate>
      <asp:hyperlink  text='<%# Bind("quote_number")%>' navigateURL='<%# "applicant.aspx?qn=" & session("varName") %>'></asp:hyperlink>
Avatar of Howard Katz

ASKER

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.

ASKER CERTIFIED SOLUTION
Avatar of Elvio Lujan
Elvio Lujan
Flag of Argentina image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial