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. General Programming
  3. C#
  4. need help..... How to link the current website that i am browsing to the textbox ?

need help..... How to link the current website that i am browsing to the textbox ?

Scheduled Pinned Locked Moved C#
questioncomgraphicshelptutorial
7 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.
  • Y Offline
    Y Offline
    YiXiang_89
    wrote on last edited by
    #1

    Hi all, I need help I have a IE toolbar menu button: Generate My flow is After i click the Generate button, the link on my current website will appear in a: Form1 > textBoxWebPageURL Form the Form1.Designer.cs this.textBoxWebPageURL.Location = new System.Drawing.Point(238, 13); this.textBoxWebPageURL.Name = "textBoxWebPageURL"; this.textBoxWebPageURL.Size = new System.Drawing.Size(328, 20); this.textBoxWebPageURL.TabIndex = 5; this.textBoxWebPageURL.Text = "http://www.codeproject.com"; <-- Whereby i have to hardcode it How do i make it auto capture the current website that i am browsing and the textbox will display the current website ? Thank You

    L 1 Reply Last reply
    0
    • Y YiXiang_89

      Hi all, I need help I have a IE toolbar menu button: Generate My flow is After i click the Generate button, the link on my current website will appear in a: Form1 > textBoxWebPageURL Form the Form1.Designer.cs this.textBoxWebPageURL.Location = new System.Drawing.Point(238, 13); this.textBoxWebPageURL.Name = "textBoxWebPageURL"; this.textBoxWebPageURL.Size = new System.Drawing.Size(328, 20); this.textBoxWebPageURL.TabIndex = 5; this.textBoxWebPageURL.Text = "http://www.codeproject.com"; <-- Whereby i have to hardcode it How do i make it auto capture the current website that i am browsing and the textbox will display the current website ? Thank You

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      Notsure what you mean by 'the current website I am browsing' - does your form have a WebBrowser control on it? Or are you talking about an independent browser? If the former, does not the Url property hold the Url of the current page?

      ___________________________________________ .\\axxx (That's an 'M')

      Y 1 Reply Last reply
      0
      • L Lost User

        Notsure what you mean by 'the current website I am browsing' - does your form have a WebBrowser control on it? Or are you talking about an independent browser? If the former, does not the Url property hold the Url of the current page?

        ___________________________________________ .\\axxx (That's an 'M')

        Y Offline
        Y Offline
        YiXiang_89
        wrote on last edited by
        #3

        The flow is like this i click on a button <<Generate>> , the last website that i am browsing will appear in my textbox << for example i am visiting http://www.codeproject.com >> I want it to be appear in the textbox after i click << Generate >> So how can i do it? Thank you

        C 1 Reply Last reply
        0
        • Y YiXiang_89

          The flow is like this i click on a button <<Generate>> , the last website that i am browsing will appear in my textbox << for example i am visiting http://www.codeproject.com >> I want it to be appear in the textbox after i click << Generate >> So how can i do it? Thank you

          C Offline
          C Offline
          Christian Graus
          wrote on last edited by
          #4

          You didn't answer his question. I assumed you meant that your code is running inside IE, and you want te currently visible page. Either way, you need to answer if you want help.

          Christian Graus Driven to the arms of OSX by Vista.

          Y 1 Reply Last reply
          0
          • C Christian Graus

            You didn't answer his question. I assumed you meant that your code is running inside IE, and you want te currently visible page. Either way, you need to answer if you want help.

            Christian Graus Driven to the arms of OSX by Vista.

            Y Offline
            Y Offline
            YiXiang_89
            wrote on last edited by
            #5

            yes is like read current active IE window's html content and it will appear into a textbox Thank You

            L 1 Reply Last reply
            0
            • Y YiXiang_89

              yes is like read current active IE window's html content and it will appear into a textbox Thank You

              L Offline
              L Offline
              Lost User
              wrote on last edited by
              #6

              I'm almost certain it's not impossible. I am certain it is complex (especially if you take into account it could not be IE, there could be multiple IE windows or tabs, it could be firefox, chrome etc.) You could try this page[^]

              ___________________________________________ .\\axxx (That's an 'M')

              Y 1 Reply Last reply
              0
              • L Lost User

                I'm almost certain it's not impossible. I am certain it is complex (especially if you take into account it could not be IE, there could be multiple IE windows or tabs, it could be firefox, chrome etc.) You could try this page[^]

                ___________________________________________ .\\axxx (That's an 'M')

                Y Offline
                Y Offline
                YiXiang_89
                wrote on last edited by
                #7

                Thank You Cause i am doing about encrypt of html - pdf So i need to know how to capture the current website to a textbox :) thank You

                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