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. Hyperlink Properties

Hyperlink Properties

Scheduled Pinned Locked Moved ASP.NET
helptutorial
12 Posts 4 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.
  • O Offline
    O Offline
    omlac
    wrote on last edited by
    #1

    I have a hyperlink on my page and i set the properties as follows hlnkLogo.NavigateUrl = (string)Session["ImageUrl"]; hlnkLogo.ImageUrl = (string)Session["ImageUrl"]; hlnkLogo.Text = (string)Session["ImageUrl"]; My problem is i cant get the imageUrl property and the the Text property to work together. If i use the ImageUrl property the text property wont work, it will only display text once i remove the imageurl propery, does anyone know how to solve this. Thank you.

    S G _ 3 Replies Last reply
    0
    • O omlac

      I have a hyperlink on my page and i set the properties as follows hlnkLogo.NavigateUrl = (string)Session["ImageUrl"]; hlnkLogo.ImageUrl = (string)Session["ImageUrl"]; hlnkLogo.Text = (string)Session["ImageUrl"]; My problem is i cant get the imageUrl property and the the Text property to work together. If i use the ImageUrl property the text property wont work, it will only display text once i remove the imageurl propery, does anyone know how to solve this. Thank you.

      S Offline
      S Offline
      sarang_k
      wrote on last edited by
      #2

      generally url is something like ~/App_Data/.... but in imageurl r u getting like that path ?

      O 1 Reply Last reply
      0
      • S sarang_k

        generally url is something like ~/App_Data/.... but in imageurl r u getting like that path ?

        O Offline
        O Offline
        omlac
        wrote on last edited by
        #3

        Im sorry my use of imageurl might be confusing, the session["imageurl"] is working fine its contents is fine, my problem is with the hlnkLogo.Imageurl and hlnkLogo.text properies. I hope this has clarified things a bit. thanks

        1 Reply Last reply
        0
        • O omlac

          I have a hyperlink on my page and i set the properties as follows hlnkLogo.NavigateUrl = (string)Session["ImageUrl"]; hlnkLogo.ImageUrl = (string)Session["ImageUrl"]; hlnkLogo.Text = (string)Session["ImageUrl"]; My problem is i cant get the imageUrl property and the the Text property to work together. If i use the ImageUrl property the text property wont work, it will only display text once i remove the imageurl propery, does anyone know how to solve this. Thank you.

          G Offline
          G Offline
          Guffa
          wrote on last edited by
          #4

          omlac wrote:

          If i use the ImageUrl property the text property wont work, it will only display text once i remove the imageurl propery

          That is by design. From the documentation: "The HyperLink control can be displayed as text or an image. Use the ImageUrl property to specify an image to display for the HyperLink control. Note: If both the Text and ImageUrl properties are set, the ImageUrl property takes precedence. If the image is unavailable, the text in the Text property is displayed. In browsers that support ToolTip functionality, the Text property also becomes the ToolTip." What is it that you are trying to accomplish?

          Despite everything, the person most likely to be fooling you next is yourself.

          O 1 Reply Last reply
          0
          • O omlac

            I have a hyperlink on my page and i set the properties as follows hlnkLogo.NavigateUrl = (string)Session["ImageUrl"]; hlnkLogo.ImageUrl = (string)Session["ImageUrl"]; hlnkLogo.Text = (string)Session["ImageUrl"]; My problem is i cant get the imageUrl property and the the Text property to work together. If i use the ImageUrl property the text property wont work, it will only display text once i remove the imageurl propery, does anyone know how to solve this. Thank you.

            _ Offline
            _ Offline
            _AK_
            wrote on last edited by
            #5

            AFAIK both these property will not work together. If you set both the property then imageURL will take the precedence and in case if image is not available then the text will be shown.

            Apurva Kaushal

            O 1 Reply Last reply
            0
            • _ _AK_

              AFAIK both these property will not work together. If you set both the property then imageURL will take the precedence and in case if image is not available then the text will be shown.

              Apurva Kaushal

              O Offline
              O Offline
              omlac
              wrote on last edited by
              #6

              Thank you I have a web application where both of them are working together, would u know which control it is, ie would you know a control that handles both. Thanx

              _ 1 Reply Last reply
              0
              • G Guffa

                omlac wrote:

                If i use the ImageUrl property the text property wont work, it will only display text once i remove the imageurl propery

                That is by design. From the documentation: "The HyperLink control can be displayed as text or an image. Use the ImageUrl property to specify an image to display for the HyperLink control. Note: If both the Text and ImageUrl properties are set, the ImageUrl property takes precedence. If the image is unavailable, the text in the Text property is displayed. In browsers that support ToolTip functionality, the Text property also becomes the ToolTip." What is it that you are trying to accomplish?

                Despite everything, the person most likely to be fooling you next is yourself.

                O Offline
                O Offline
                omlac
                wrote on last edited by
                #7

                Thank you very much. Let me use the tooltip, but would u know of a control that handles both simultaenously, i have a web app where both are working unfotunately i cant send it here on the forum coz its not on the internet. thanks

                G 1 Reply Last reply
                0
                • O omlac

                  Thank you very much. Let me use the tooltip, but would u know of a control that handles both simultaenously, i have a web app where both are working unfotunately i cant send it here on the forum coz its not on the internet. thanks

                  G Offline
                  G Offline
                  Guffa
                  wrote on last edited by
                  #8

                  You say that you want both properties to work, but you haven't explained how you would want it to work. What would something like that look like?

                  Despite everything, the person most likely to be fooling you next is yourself.

                  O 1 Reply Last reply
                  0
                  • O omlac

                    Thank you I have a web application where both of them are working together, would u know which control it is, ie would you know a control that handles both. Thanx

                    _ Offline
                    _ Offline
                    _AK_
                    wrote on last edited by
                    #9

                    May be some custom control. Or if you can give some more detail like of its behaviour then may be we can be able to make a guess. :)

                    Apurva Kaushal

                    O 1 Reply Last reply
                    0
                    • G Guffa

                      You say that you want both properties to work, but you haven't explained how you would want it to work. What would something like that look like?

                      Despite everything, the person most likely to be fooling you next is yourself.

                      O Offline
                      O Offline
                      omlac
                      wrote on last edited by
                      #10

                      i wanted both the imageurl to display the image and the Text property to display the text simultanesouly. Thank you very much for your help, i think i can add an image button next to the hyperlink unless if you have a better idea. Regards

                      1 Reply Last reply
                      0
                      • _ _AK_

                        May be some custom control. Or if you can give some more detail like of its behaviour then may be we can be able to make a guess. :)

                        Apurva Kaushal

                        O Offline
                        O Offline
                        omlac
                        wrote on last edited by
                        #11

                        Thank you for your help, i will try to add an image button next to the hyperlink. If you have a better idea your help is appreciated Regards

                        _ 1 Reply Last reply
                        0
                        • O omlac

                          Thank you for your help, i will try to add an image button next to the hyperlink. If you have a better idea your help is appreciated Regards

                          _ Offline
                          _ Offline
                          _AK_
                          wrote on last edited by
                          #12

                          Yes this will be a better idea. :)

                          Apurva Kaushal

                          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