473,657 Members | 2,851 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Hosting webbrowser control in Form and specifying Browser type

My Windows.Form application hosts the WebBrowser control which
interacts with an ASP page that I wrote. How can i detect (on server
side) whether the request is coming in from my WIndows.Form application
or from an instance of IE? Can i set some property on WebBrowser
control?

Jan 17 '07 #1
1 1695
To detect what browser is hitting the server, you have to look at the
User-Agent header.

Because the WebBrowser control really just encapsulates an instance of
whatever IE browser is on the machine, the User-Agent is set to whatever
IE's user agent is set to.

I couldn't find anything about how to set the User-Agent using the
WebBrowser control, but you can do this by wrapping the AxBrowser control.

Good luck.

Robert

"George" <go************ *****@spamgourm et.comwrote in message
news:11******** **************@ l53g2000cwa.goo glegroups.com.. .
My Windows.Form application hosts the WebBrowser control which
interacts with an ASP page that I wrote. How can i detect (on server
side) whether the request is coming in from my WIndows.Form application
or from an instance of IE? Can i set some property on WebBrowser
control?

Jan 17 '07 #2

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

Similar topics

0
3468
by: Trevor Fairchild | last post by:
I'm trying to have VB6 write an html file during run-time, with some VBScript functionality. The intent is to display images based on the current record within the program - using a WebBrowser - plus some buttons to dynamically resize the image. I have gotten almost everything to work - I put in a function to simply disable the right-click option of the browser, but none of the other functions work. If I copy the source data out of...
4
2876
by: Randy | last post by:
Hi, ok, I found a way to connect to a running instance of an (external) Internet Explorer and access - for example - the html source. That works fine! But now I have running application with an embedded IE webBrowser Control. Is there a possibility for my application to access the webBrowser control in the other application, too? Thanks in advance, Randy
4
3484
by: Supra | last post by:
I have a tab control in a which a few of the tabs include an AxWebBrowser browser control. Let say i have currently tabpage2 and i typed url in combobox when i pressed enter it doesn't display webbrowser instead i can do create new tab. ne one knows how to display currrently displayed regardless of tabpage(s)? here is code: Public Sub AddBrowserTab() AxWebBrowser1.Visible = False Dim newPage As TabPage = New TabPage(Text) ' Delcare and...
0
3459
by: Jim Hubbard | last post by:
How would I implement the IDispatch interface to handle the following in VB.Net <BEGIN> Controlling Download and Execution The WebBrowser Control gives you control over what it downloads, displays, and executes. To gain this control, you need to implement your host's IDispatch so it handles DISPID_AMBIENT_DLCONTROL. When the WebBrowser Control is instantiated, it will call your IDispatch::Invoke with this ID. Set pvarResult to a...
2
5490
by: cweeks78681 | last post by:
I am porting some VB6 code that automates navigation through a web page by getting all the <a> tags into a collection and then calling the Click method on the appropriate one. How do I click a link in a web page using the WebBrowser control in VS 2005 C# Express and .NET 2.0?
11
2817
by: Anil Gupte | last post by:
....and how do I insert one into my form? I used in VB 6.0 last, but cannot figure out where it is in .Net Thanx, -- Anil Gupte www.keeninc.net www.icinema.com
1
5159
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);
0
5557
by: gunimpi | last post by:
http://www.vbforums.com/showthread.php?p=2745431#post2745431 ******************************************************** VB6 OR VBA & Webbrowser DOM Tiny $50 Mini Project Programmer help wanted ******************************************************** For this teeny job, please refer to: http://feeds.reddit.com/feed/8fu/?o=25
1
3681
by: Rotsey | last post by:
Hi, I have a form with a webbrowser control set to fill the form. I want to capture when the form is clicked. As the browser control is filling the form the user would click on the browser conttrol, but it does not have a click event. How can I trap the click event for a form like this????
0
8385
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
8821
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...
1
8502
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8602
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7316
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5632
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4300
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2726
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1941
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.