Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Datagrid hyperlink with multiple parameters

Posted on 2004-10-20
4
Medium Priority
?
406 Views
Last Modified: 2010-05-18
I have a datagrid in which I need a hyperlink column that links to another aspx page, with another datagrid. My problem is that the detail information in the dataset on the second page is related to the first dataset by two fields. More specifically, my database is dealing with roof areas of different schools. The areas have labels (A, A1, A2, B, B1, etc.), and so the detail page needs to pull all the data for a certain roof area for the specific school. Everywhere I have seen, you can only pass one "parameter" (DataNavigateUrlField) to the linked page. Is there a way to pass two values for the DataNavigateUrlField?

Thanks in advance for any help.

Christy
0
Comment
Question by:ccbailey
[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
  • 2
4 Comments
 
LVL 20

Accepted Solution

by:
jitganguly earned 1000 total points
ID: 12358822
:-)
Even I couldn' find out when I had this problem, same boat brother (?)

Anyway, Teh solution is to use templatecolumn

Do it like this

<asp:templatecolumn headertext="Daily">
<itemtemplate>
<asp:HyperLink Runat="server" Target=_blank NavigateUrl='<%#"DetailPnl.aspx?option=Daily&Product_Type="+DataBinder.Eval(Container.DataItem, "Product Type")+"&mydate="+DataBinder.Eval(Container.DataItem, "currentdate")%>'>
<%#DataBinder.Eval(Container.DataItem, "Daily","{0:N2}")%>
</asp:HyperLink>
</itemtemplate>
</asp:templatecolumn>

See NavigateUrl



0
 

Author Comment

by:ccbailey
ID: 12360428
Thanks for your help.  I have the following code for this template column, and it creates a column labeled "Nomenclature Detail", however there are no links in the column - it is blank.  Can you see what I missed?

<asp:templatecolumn headertext="Nomenclature Detail">
        <itemtemplate>
          <asp:HyperLink Runat="server" Target=_blank NavigateUrl='<%#"NomenclatureReportResult.aspx?FacilityValue="+DataBinder.Eval(Container.DataItem, "FacilityID")+"&SectionValue="+DataBinder.Eval(Container.DataItem, "SectionID")%>'>
          </asp:HyperLink>
        </itemtemplate>
       </asp:templatecolumn>

Thanks,
Christy

0
 
LVL 20

Expert Comment

by:jitganguly
ID: 12360527
Try this
You have to ptu somethign inside hyperlink tag. I put FacilityID

<asp:templatecolumn headertext="Nomenclature Detail">
        <itemtemplate>
          <asp:HyperLink Runat="server" Target=_blank NavigateUrl='<%#"NomenclatureReportResult.aspx?FacilityValue="+DataBinder.Eval(Container.DataItem, "FacilityID")+"&SectionValue="+DataBinder.Eval(Container.DataItem, "SectionID")%>'>
<%#DataBinder.Eval(Container.DataItem, "FacilityID")%>
          </asp:HyperLink>
        </itemtemplate>
       </asp:templatecolumn>
0
 

Author Comment

by:ccbailey
ID: 12360675
Perfect - that is exactly what I needed!

Thanks so much!

Christy
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…

593 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