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. accessing hyperlink text on next page

accessing hyperlink text on next page

Scheduled Pinned Locked Moved ASP.NET
tutorialquestion
4 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.
  • N Offline
    N Offline
    neoms21
    wrote on last edited by
    #1

    i have a datagrid hyperlinkcolumn which takes application to next page on that next page i want to retrieve that value which was visible in the datagrid as hyperlink .how to do this?

    M 1 Reply Last reply
    0
    • N neoms21

      i have a datagrid hyperlinkcolumn which takes application to next page on that next page i want to retrieve that value which was visible in the datagrid as hyperlink .how to do this?

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

      Hi there, In this case, you simply attach the value in the query string of the url, then in the destination page you can easily retrieve the value. The HyperLinkColumn looks something like:

      <asp:HyperLinkColumn HeaderText="HyperLinkColumn" DataNavigateUrlField="Name"
      DataTextField="Name" DataNavigateUrlFormatString="WebForm.aspx?key={0}">
      </asp:HyperLinkColumn>

      N 1 Reply Last reply
      0
      • M minhpc_bk

        Hi there, In this case, you simply attach the value in the query string of the url, then in the destination page you can easily retrieve the value. The HyperLinkColumn looks something like:

        <asp:HyperLinkColumn HeaderText="HyperLinkColumn" DataNavigateUrlField="Name"
        DataTextField="Name" DataNavigateUrlFormatString="WebForm.aspx?key={0}">
        </asp:HyperLinkColumn>

        N Offline
        N Offline
        neoms21
        wrote on last edited by
        #3

        but how to acces that on next page in a textbox. i'll be thankful for your reply.

        M 1 Reply Last reply
        0
        • N neoms21

          but how to acces that on next page in a textbox. i'll be thankful for your reply.

          M Offline
          M Offline
          minhpc_bk
          wrote on last edited by
          #4

          To access a key entry in the query string, you simply use the Request object in the next page:

          string val = Request.QueryString["key"];
          TextBox1.Text = val;

          For more information on the Request object, see HttpRequest Members[^]

          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