473,944 Members | 5,263 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

C# and AxSHDocVw - Microsoft Web Browser Control

Does anyone know how to get the full URL filename from a Microsoft Web
Browser control? I can use wbBrowserObj.Lo ctionURL to get the path but it
seems to be missing the file name... I need the specific filename that a
person browses to using the web browser control.

Thanks,
Nov 17 '05 #1
2 2851
I think you just need to capture the DocumentComplet e event, and then the
AxSHDocVw.DWebB rowserEvents2_D ocumentComplete Event has the complete url as an
object... code below...

private void axWebBrowser1_D ocumentComplete (object sender,
AxSHDocVw.DWebB rowserEvents2_D ocumentComplete Event e)
{
string theUrl = e.uRL.ToString( );
}

this is of course if your using an active x control of the web browser and
not .net 2.0's built in control, although I do think the idea will be the
same for both...

"eXtreme" wrote: Does anyone know how to get the full URL filename from a Microsoft Web
Browser control? I can use wbBrowserObj.Lo ctionURL to get the path but it
seems to be missing the file name... I need the specific filename that a
person browses to using the web browser control.

Thanks,


Nov 17 '05 #2
I'm still using .NET 1.1... would be nice to have the .NET browser control.

"Andy Johnson" <An*********@di scussions.micro soft.com> wrote in message
news:5C******** *************** ***********@mic rosoft.com...
I think you just need to capture the DocumentComplet e event, and then the
AxSHDocVw.DWebB rowserEvents2_D ocumentComplete Event has the complete url as
an
object... code below...

private void axWebBrowser1_D ocumentComplete (object sender,
AxSHDocVw.DWebB rowserEvents2_D ocumentComplete Event e)
{
string theUrl = e.uRL.ToString( );
}

this is of course if your using an active x control of the web browser and
not .net 2.0's built in control, although I do think the idea will be the
same for both...

"eXtreme" wrote:

Does anyone know how to get the full URL filename from a Microsoft Web
Browser control? I can use wbBrowserObj.Lo ctionURL to get the path but
it
seems to be missing the file name... I need the specific filename that a
person browses to using the web browser control.

Thanks,

Nov 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1997
by: David Elliott | last post by:
I have created an application that loads assemblies (plugins). These plugins are windows forms that have an embedded browser. private AxSHDocVw.AxWebBrowser browser; If I comment out this.browser = new AxSHDocVw.AxWebBrowser(); and associated code to avoid exceptions like this.browser.Dock = System.Windows.Forms.DockStyle.Fill; this.browser.Enabled = true;
3
3391
by: Simon CJC | last post by:
Hello I use AxSHDocVw.AxWebBrowser in a windows application. But sometimes the url I browsed in AxSHDocVw.AxWebBrowser contains error caused by javascript. Can I prevent javascript from running in AxSHDocVw.AxWebBrowser Thanks Simon CJC
2
4194
by: Chance Hopkins | last post by:
I'm trying to use the AxSHDocVw.AxWebBrowser control in a form and when I call .Navigate, instead of showing the html page, the download prompt shows up. If I click open, it uses my default browser instead of the control. If I open an excel doc or a word doc on my local HD, it shows up in the control after I click open. Does anyone know what I should check, to get the control opening HTML pages in itself instead of the default browser?
0
1394
by: Eþref DURNA | last post by:
I m navigateing a url and want to display that image at my web browser on my Windows application I m using AxSHDocVw.AxWebBrowser but when ever i redirect that url it does not shows that image it starts to download it I dont want to Download that Image i want to display it on my AxSHDocVw.AxWebBrowser or could someone tell me how do i control the windows file download dll ?
3
3886
by: MPR | last post by:
Hi guys; I'm using an AxSHDocVw.AxWebBrowser control to show a web page. I need to know if i can ( and how? ) i do the following things: 1 - I need to follow 1 link in the webpage diplayed in the AxSHDocVw.AxWebBrowser control. 2 - I need to input some data in a texto box on it
1
4784
by: Oenone | last post by:
I've reached the conversion of a part of my application from VB6 to VB.NET which uses the COM Web Browser control to display HTML content generated by my application. The general approach used in VB6 is as follows: Open the form containing the browser Wait a few seconds for the Browser.Document property to initialise With the Document object, call the following methods: .Clear()
0
2069
by: sagar.jawale | last post by:
Hi, In my c# windows application, i am using AxSHDocVw.AxWebBrowser. I am displaying a generated receipt html in this browser. Also, for printing the same html, i am using the following command : axWebBrowser2.ExecWB(SHDocVw.OLECMDID.OLECMDID_PRINT, SHDocVw.OLECMDEXECOPT.OLECMDEXECOPT_DONTPROMPTUSER,ref empty,ref empty);
1
5180
by: Joe | last post by:
HI Trying to figure out the difference between these 2 browser I am embedding a MS office Document (Word/Excel) in a WebBrowser on a Form With AxSHDocVw I can do the following to save the current document object o = new object(); axWebBrowser1.ExecWB(SHDocVw.OLECMDID.OLECMDID_SAVE,SHDocVw.OLECMDEXECOPT.OLECMDEXECOPT_DONTPROMPTUSER, ref o, ref o);
3
3787
by: David | last post by:
I would like to use a AxSHDocVw.WebBroswer control in a Windows service- is this possible without creating a form? I added the reference I usually use to add this object in a Windows Application but only SHDocVw appears under References in the Solution Explorer. As an alternative, SHDocVw.WebBrowser may work but I am not sure how to add an event handler for it- does anyone know how to add a DocCompleted event for this object?
0
10143
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9970
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
11542
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
11133
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8233
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6090
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
6312
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
4515
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3517
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.