Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. How to pass multiple field values from a datagrid hyperlink?

How to pass multiple field values from a datagrid hyperlink?

Scheduled Pinned Locked Moved ASP.NET
databasetutorialquestion
2 Posts 2 Posters 4 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    jmelgar
    wrote on last edited by
    #1

    :confused:I'm using a datagrid with a hyperlink column displaying each person's name as the link. When the name is clicked, I'd like to pass the name and other field values (i.e. SSN, phone), contained in the datagrid, as a query string. However, the DataNavigateUrlField only let's me enter one field value. Any ideas how I could pass more than one field value (as a query string) by clicking a hyperlink in a datagrid? Thanks all.

    N 1 Reply Last reply
    0
    • J jmelgar

      :confused:I'm using a datagrid with a hyperlink column displaying each person's name as the link. When the name is clicked, I'd like to pass the name and other field values (i.e. SSN, phone), contained in the datagrid, as a query string. However, the DataNavigateUrlField only let's me enter one field value. Any ideas how I could pass more than one field value (as a query string) by clicking a hyperlink in a datagrid? Thanks all.

      N Offline
      N Offline
      Nick Seng
      wrote on last edited by
      #2

      I recently had this problem too when I was trying to pass two variables. I figured out a way, but since one of the variables was not dependant on the datagrid, I don't think it'll help you much, but here's the code i used:

          Dim col As New HyperLinkColumn()
           col.DataNavigateUrlField = _your field_
          col.DataNavigateUrlFormatString = Request.FilePath() & "?id={0}&proj=" & TextBox1.Text
      

      Maybe this will give some idea? Notorious SMC


      The difference between the almost-right word & the right word is a really large matter - it's the difference between the lightning bug and the Lightning Mark Twain
      Get your facts first, and then you can distort them as much as you please Mark Twain

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups