I am trying to get the current URL from an internet
explorer window using the string str = Request.RawUrl; and then put the output
into a text box on a form for later processing but I am getting an error saying
that the name request does not exist in the current context.
Am I missing something very obvious or am I going about this the wrong way?
Any advice would be greatly appreciated
Loading

Kirtan PatelRank #292 · 8.6K reputationPosted Dec 16, 2009, 3:35 AM EST
please check "do you like this answer" check box if it helps you :)
Step 1 :
Add Reference to Below Library
By Project Menu >> Add Reference like Shown in Image
Step 2:
add Following using Statement
using SHDocVw;
Step 3:
Code Like Below To Get Current URL of Internet Explore .
private void button1_Click(object sender, EventArgs e)
{
foreach (InternetExplorer ie in new ShellWindowsClass())
{
textBox1.Text = ie.LocationURL.ToString();
}}
Srinivas KotraRank #8,059 · 229 reputationPosted Dec 16, 2009, 2:33 AM EST
"); Textbox.text = MyUrl }
Hiren SoniRank #694 · 3.5K reputationPosted Dec 16, 2009, 3:13 AM EST
Coder3 reputationPosted Dec 18, 2009, 2:23 AM EST
Hi All,
Thanks for your input I have managed to get it to work now
Your advise is greatly appreciated
:-)