Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C# 2005 > C# 2005
|
C# 2005 For discussion of Visual C# 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# 2005 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 10th, 2008, 04:53 AM
Authorized User
 
Join Date: Apr 2008
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default get Current UrL from Firefox



   I got Current Url from IE. But I dont Know how to get Current Url from Mozilla Firefox.


please help me.

 
Old April 10th, 2008, 04:55 AM
samjudson's Avatar
Friend of Wrox
 
Join Date: Aug 2007
Posts: 2,128
Thanks: 1
Thanked 189 Times in 188 Posts
Default

I'm curious, how did you get the current Url from IE?

/- Sam Judson : Wrox Technical Editor -/
 
Old April 10th, 2008, 05:02 AM
Friend of Wrox
 
Join Date: Mar 2007
Posts: 432
Thanks: 0
Thanked 1 Time in 1 Post
Default

Just an idea, and I have no idea if it is actually possible, but can you not retrieve it using JavaScript (namely the location object)?

I know you can obviously set the current location, just not so sure about receiving it. :)

Rob
The Developing Developer
Currently Working Towards: MCAD C#
My Blog: http://www.robzyc.spaces.live.com
<center>"Nothing can stop the man with the right mental attitude from achieving his goal;
nothing on earth can help the man with the wrong mental attitude".

Thomas Jefferson</center>
 
Old April 10th, 2008, 05:06 AM
samjudson's Avatar
Friend of Wrox
 
Join Date: Aug 2007
Posts: 2,128
Thanks: 1
Thanked 189 Times in 188 Posts
Default

This has been posted to the C# forum, so I was hoping it had something to do with C#, and wasn't a javascript question.

In Javascript its simply "window.location.href".

/- Sam Judson : Wrox Technical Editor -/
 
Old April 10th, 2008, 05:12 AM
Authorized User
 
Join Date: Apr 2008
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default


this isa code for get Url from Internet Explorer


 SHDocVw.InternetExplorer m_browser = null;

            string myLocalLink = null;

            mshtml.IHTMLDocument2 myDoc = null;

            SHDocVw.ShellWindows shellWindows = new SHDocVw.ShellWindowsClass();

            string filename;

            foreach (SHDocVw.InternetExplorer ie in shellWindows)
            {

                filename = Path.GetFileNameWithoutExtension(ie.FullName).ToLo wer();



                if (filename == "iexplore")
                {

                        m_browser = ie;
                 myDoc = (mshtml.IHTMLDocument2)m_browser.Document;

                        myLocalLink = myDoc.url;
                        messagexbox.Show(myLocalLink)

}
}


 
Old April 10th, 2008, 05:16 AM
Friend of Wrox
 
Join Date: Mar 2007
Posts: 432
Thanks: 0
Thanked 1 Time in 1 Post
Default

Oh yeah, I just mentioned JS because I have no idea how to do it in C# - yet to get into all the web goodness :D

Rob
The Developing Developer
Currently Working Towards: MCAD C#
My Blog: http://www.robzyc.spaces.live.com
<center>"Nothing can stop the man with the right mental attitude from achieving his goal;
nothing on earth can help the man with the wrong mental attitude".

Thomas Jefferson</center>
 
Old May 16th, 2008, 09:03 AM
Registered User
 
Join Date: Apr 2008
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi,

I have the same problem also, I can access IE address Bar but I can't read URL from FireFox. There could be some solution using oleacc.dll but that is for VC++ I think. Can anyone please help me out?






Similar Threads
Thread Thread Starter Forum Replies Last Post
URL Redirect based on given URL somnath.kartic VS.NET 2002/2003 1 August 2nd, 2012 08:21 AM
Retrive Visited URL from FireFox senpark15 C# 2005 4 April 10th, 2008 12:35 AM
URL rewriting with URL forwarding mtabyana BOOK: Professional Search Engine Optimization with PHP: A Dev's Guide to SEO ISBN: 978-0-470-10092-9 0 October 22nd, 2007 08:22 AM
Reading current http url dynamically in php hi2php PHP How-To 1 November 1st, 2006 04:16 AM
extract URL from Favorites (.URL Files) PhilHawks VB.NET 2002/2003 Basics 2 November 2nd, 2004 04:35 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.