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 in code behind [modified]

hyperlink in code behind [modified]

Scheduled Pinned Locked Moved ASP.NET
questiondata-structurestoolshelp
5 Posts 3 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.
  • M Offline
    M Offline
    mehnazash
    wrote on last edited by
    #1

    Hi I have an array of URLs I wanna display them in the form of hyperlinks using StringBuilder ie StringBuilderobject.Append("url") i wanna convert above "url" in the form of hyperlink to be displayed in browser How do i do Should i use some script? please help Thanks Jiny -- modified at 5:36 Tuesday 27th June, 2006

    S 1 Reply Last reply
    0
    • M mehnazash

      Hi I have an array of URLs I wanna display them in the form of hyperlinks using StringBuilder ie StringBuilderobject.Append("url") i wanna convert above "url" in the form of hyperlink to be displayed in browser How do i do Should i use some script? please help Thanks Jiny -- modified at 5:36 Tuesday 27th June, 2006

      S Offline
      S Offline
      Sushant Duggal
      wrote on last edited by
      #2

      Hi, Do you have the URLs in a comma seperated string? If yes, you can split it into a string array and then generate array of hyperlinks as much as string array lentgh of the URLs. I hope this will help you, If not, please explain your situation Thanks, Sushant Duggal.

      M 1 Reply Last reply
      0
      • S Sushant Duggal

        Hi, Do you have the URLs in a comma seperated string? If yes, you can split it into a string array and then generate array of hyperlinks as much as string array lentgh of the URLs. I hope this will help you, If not, please explain your situation Thanks, Sushant Duggal.

        M Offline
        M Offline
        mehnazash
        wrote on last edited by
        #3

        My code looks something like this foreach (ResultElement reselem in objres.resultElements) { //here sb is object of string builder sb.Append("<a href="\ + reselem.URL + "\">" + reselem.title + "</a><br />"); } TextBox1.text = sb.ToString(); Rather than displying it as hyperlink, it displaysas "a href="\...... kindly help, how can display it in the form of hyperlink Thanks Jiny

        P 1 Reply Last reply
        0
        • M mehnazash

          My code looks something like this foreach (ResultElement reselem in objres.resultElements) { //here sb is object of string builder sb.Append("<a href="\ + reselem.URL + "\">" + reselem.title + "</a><br />"); } TextBox1.text = sb.ToString(); Rather than displying it as hyperlink, it displaysas "a href="\...... kindly help, how can display it in the form of hyperlink Thanks Jiny

          P Offline
          P Offline
          Paddy Boyd
          wrote on last edited by
          #4

          Place a repeater control on the page that contains a hyperlink control. bind your collection - objRes.resultElements to the repeater. In the repeater, bind the url property of the hyperlink control to the URL property and the text to the title property. This should then display a list of all the urls. If you are trying to display a clickable url in a textbox, then i don't think that this is possible.

          M 1 Reply Last reply
          0
          • P Paddy Boyd

            Place a repeater control on the page that contains a hyperlink control. bind your collection - objRes.resultElements to the repeater. In the repeater, bind the url property of the hyperlink control to the URL property and the text to the title property. This should then display a list of all the urls. If you are trying to display a clickable url in a textbox, then i don't think that this is possible.

            M Offline
            M Offline
            mehnazash
            wrote on last edited by
            #5

            Got it Thnaks everyone

            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