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. variable Hyperlink in datagrid

variable Hyperlink in datagrid

Scheduled Pinned Locked Moved ASP.NET
phpdockerhelpquestion
2 Posts 2 Posters 0 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.
  • S Offline
    S Offline
    Suman Singh
    wrote on last edited by
    #1

    Hi All, I m trying to create a variable hyperlink in a datagrid.... this is the code... **<-- DataBinder.Eval is not working, it is displaying as it is------->** HyperLinkColumn Target="_self" DataNavigateUrlField="prod_num" DataNavigateUrlFormatString="cardinfo.php?prodnum=<%# DataBinder.Eval(Container.DataItem, 'prod_num')%>" DataTextField="sku" HeaderText="sku"> **<------------------------------------------>** I have removed the asp:HyperLinkColumn tag from here, because it was not displaying in the browser... 'prod_num' is the column name comming from databse.... Thanks in advance for your help. Suman Singh

    M 1 Reply Last reply
    0
    • S Suman Singh

      Hi All, I m trying to create a variable hyperlink in a datagrid.... this is the code... **<-- DataBinder.Eval is not working, it is displaying as it is------->** HyperLinkColumn Target="_self" DataNavigateUrlField="prod_num" DataNavigateUrlFormatString="cardinfo.php?prodnum=<%# DataBinder.Eval(Container.DataItem, 'prod_num')%>" DataTextField="sku" HeaderText="sku"> **<------------------------------------------>** I have removed the asp:HyperLinkColumn tag from here, because it was not displaying in the browser... 'prod_num' is the column name comming from databse.... Thanks in advance for your help. Suman Singh

      M Offline
      M Offline
      MihirV
      wrote on last edited by
      #2

      hi there try this

      <asp:HyperLinkColumn DataNavigateUrlField="prod_num" DataNavigateUrlFormatString="cardinfo.php?prodnum={0}"
      DataTextField="sku" HeaderText="SKU"></asp:HyperLinkColumn>
      
      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