How to link the current website to your textbox ?
-
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
-
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
YiXiang_89 wrote:
this.textBoxWebPageURL.Text = "http://www.codeproject.com";
Perhaps try: this.textBoxWebPageURL.Text = Request.RawURL;
-
YiXiang_89 wrote:
this.textBoxWebPageURL.Text = "http://www.codeproject.com";
Perhaps try: this.textBoxWebPageURL.Text = Request.RawURL;
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
-
YiXiang_89 wrote:
this.textBoxWebPageURL.Text = "http://www.codeproject.com";
Perhaps try: this.textBoxWebPageURL.Text = Request.RawURL;
i using VB C# Window application need to read current active IE window's html content and will pass to my textbox Thank You
-
YiXiang_89 wrote:
this.textBoxWebPageURL.Text = "http://www.codeproject.com";
Perhaps try: this.textBoxWebPageURL.Text = Request.RawURL;
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[^]