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. Other Discussions
  3. IT & Infrastructure
  4. How to link the current website to your textbox ?

How to link the current website to your textbox ?

Scheduled Pinned Locked Moved IT & Infrastructure
questioncomgraphicshelptutorial
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.
  • 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

    F 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

      F Offline
      F Offline
      fred_
      wrote on last edited by
      #2

      YiXiang_89 wrote:

      this.textBoxWebPageURL.Text = "http://www.codeproject.com";

      Perhaps try: this.textBoxWebPageURL.Text = Request.RawURL;

      Y T 3 Replies Last reply
      0
      • F fred_

        YiXiang_89 wrote:

        this.textBoxWebPageURL.Text = "http://www.codeproject.com";

        Perhaps try: this.textBoxWebPageURL.Text = Request.RawURL;

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

        fred_ wrote:

        this.textBoxWebPageURL.Text = Request.RawURL;

        What code do i need to add for the Request? As the error state: The name Request does not exist in the current context Thank You

        1 Reply Last reply
        0
        • F fred_

          YiXiang_89 wrote:

          this.textBoxWebPageURL.Text = "http://www.codeproject.com";

          Perhaps try: this.textBoxWebPageURL.Text = Request.RawURL;

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

          i using VB C# Window application need to read current active IE window's html content and will pass to my textbox Thank You

          1 Reply Last reply
          0
          • F fred_

            YiXiang_89 wrote:

            this.textBoxWebPageURL.Text = "http://www.codeproject.com";

            Perhaps try: this.textBoxWebPageURL.Text = Request.RawURL;

            T Offline
            T Offline
            tech603
            wrote on last edited by
            #5

            The way to do it in C# would be this TextBox1.Text = Request.Url.AbsoluteUri; This will get you the absolute url. The previous comment about Request.RawUrl would only get the relative path such as in the example here http://www.hostmysite.com/hosting/compare it would only return /hosting/compare Hope this helps Matthew Vass QA Analyst mvass@hostmysite.com http://www.hostmysite.com?utm_source=bb[^]

            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