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. Why Dim hpl As HyperLink = CType(acc.FindControl("hpl"), HyperLink) didn't find my control inAccordion?

Why Dim hpl As HyperLink = CType(acc.FindControl("hpl"), HyperLink) didn't find my control inAccordion?

Scheduled Pinned Locked Moved ASP.NET
helpquestion
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.
  • S Offline
    S Offline
    Saba02
    wrote on last edited by
    #1

    Hi all, I have a hyperlink in a Accordion ajax control,now i use this code for finding it: Dim hpl As HyperLink = CType(acc.FindControl("hpl"), HyperLink) this Error comes: object reference not set to an object now how i can find my hyperlink :( ?

    Hoda

    Z 1 Reply Last reply
    0
    • S Saba02

      Hi all, I have a hyperlink in a Accordion ajax control,now i use this code for finding it: Dim hpl As HyperLink = CType(acc.FindControl("hpl"), HyperLink) this Error comes: object reference not set to an object now how i can find my hyperlink :( ?

      Hoda

      Z Offline
      Z Offline
      Zia Ul Haq Soofi
      wrote on last edited by
      #2

      Many things are missing in your question: 1. Are you using tag for hyperlink or use HyperLink control from toolbox. 2. If you are using control from toolbox, What is the ID of HyperLink Control.

      be a part of the solution, rather then problem

      S 1 Reply Last reply
      0
      • Z Zia Ul Haq Soofi

        Many things are missing in your question: 1. Are you using tag for hyperlink or use HyperLink control from toolbox. 2. If you are using control from toolbox, What is the ID of HyperLink Control.

        be a part of the solution, rather then problem

        S Offline
        S Offline
        Saba02
        wrote on last edited by
        #3

        thank you, 1. Are you using tag for hyperlink or use HyperLink control from toolbox. --->i used HyperLink control from toolbox. 2. If you are using control from toolbox, What is the ID of HyperLink Control. --->I changed its ID to hpl.

        Hoda

        Z 1 Reply Last reply
        0
        • S Saba02

          thank you, 1. Are you using tag for hyperlink or use HyperLink control from toolbox. --->i used HyperLink control from toolbox. 2. If you are using control from toolbox, What is the ID of HyperLink Control. --->I changed its ID to hpl.

          Hoda

          Z Offline
          Z Offline
          Zia Ul Haq Soofi
          wrote on last edited by
          #4

          if you are using hyperlink control, why do you need to find that control. You can access it like: Me.hpl.NavigateURL = "http://Yahoo.com"

          be a part of the solution, rather then problem

          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