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. array of hyperlinks-->

array of hyperlinks-->

Scheduled Pinned Locked Moved ASP.NET
helpdatabasedata-structuresquestion
3 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.
  • B Offline
    B Offline
    bishwambhar_sen
    wrote on last edited by
    #1

    Hi all, I would like to share with u all a problem which I am facing at the moment.I am using a gridview which I am populating using an sqldataadapter(through code and not statically).Now What I need to do is to change one of the columns into hyperlink.For instance the one we have in emails.When I click on the different hyperlinks within the same column I should be redirected to a common page but with different values through query string.For this I am trying to create an array of hyperlinks.But I am getting problem while initializing it.I am doing something like this---

    dim hf() as hyperlink=???
    while i
    hf(i).navigateurl="....?value="+i.tostring
    hf(i).text=......
    gridview1.rows(i).cells(0).controls(0).add(hf(i))
    end while

    But I am facing problem in the first line that is the initialization part.Please help me out with this.:confused:

    G 1 Reply Last reply
    0
    • B bishwambhar_sen

      Hi all, I would like to share with u all a problem which I am facing at the moment.I am using a gridview which I am populating using an sqldataadapter(through code and not statically).Now What I need to do is to change one of the columns into hyperlink.For instance the one we have in emails.When I click on the different hyperlinks within the same column I should be redirected to a common page but with different values through query string.For this I am trying to create an array of hyperlinks.But I am getting problem while initializing it.I am doing something like this---

      dim hf() as hyperlink=???
      while i
      hf(i).navigateurl="....?value="+i.tostring
      hf(i).text=......
      gridview1.rows(i).cells(0).controls(0).add(hf(i))
      end while

      But I am facing problem in the first line that is the initialization part.Please help me out with this.:confused:

      G Offline
      G Offline
      Gaurav K Singh
      wrote on last edited by
      #2

      Try this... Dim hf As HyperLink() = New HyperLink(100) {}

      The miracle is this--the more we share, the more we have.

      B 1 Reply Last reply
      0
      • G Gaurav K Singh

        Try this... Dim hf As HyperLink() = New HyperLink(100) {}

        The miracle is this--the more we share, the more we have.

        B Offline
        B Offline
        bishwambhar_sen
        wrote on last edited by
        #3

        Hi Gaurav, I tried it,but it is showing me the same error "Object reference not set to an instance of an object!" I dont know what to do.I have a deadline to meet.Going crazy.Plz help me out !! :((

        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