Solved

auto launch IE if using a different browser type

Posted on 2004-09-14
8
274 Views
Last Modified: 2008-03-03
Is it possible to auto launch IE if the client is using another browser - say netscape? I'm writing in asp.net

Dim bc As HttpBrowserCapabilities = Request.Browser
MyLabel.Text = "Platform: "& request.Browser.Platform & " -- Browser: " & bc.Browser & "**** use IE ****"

I'm presumming the platform is Windows and using the default path.
Now do the auto launch of IE
C:\Program Files\Internet Explorer\IEXPLORE.EXE/'http://127.0.0.1/test.aspx

Any Ideas?
0
Comment
Question by:matthersjr
8 Comments
 
LVL 25

Expert Comment

by:nauman_ahmed
ID: 12058746
I dont think that it will be allowed unless you write a VBS for it.

-Nauman.
0
 
LVL 25

Expert Comment

by:nauman_ahmed
ID: 12058760
Try the following:

Set IE = createobject ("InternetExplorer.Application")

with IE .left=200
.top=200
.height=500
.width=500
.menubar=0
.toolbar=0
.statusbar=0
.navigate "http:<Insert web-page here!>"
.visible=1
end with


-Nauman
0
 

Author Comment

by:matthersjr
ID: 12058931
here is what I've got:

---
Sub Page_Load(Sourec As Object, E As EventArgs)
            If Not IsPostBack Then
                  If Request.Browser.Browser = "IE" Then
                        If Request.Browser.MajorVersion < 6 Then
                              MyLabel.Text = "Upgrade"
                        Else
                              MyLabel.Text = "Up to date"
                        End If
                  Else
                        Dim bc As HttpBrowserCapabilities = Request.Browser
MyLabel.Text = "Platform: "& request.Browser.Platform & " -- Browser: " & bc.Browser & "**** use IE ****"
'now do the auto launch of ie
'C:\Program Files\Internet Explorer\IEXPLORE.EXE/'http://tp0841/dev/wroxaspnet/chp10/browsercheck.aspx
                              Set IE = createobject ("InternetExplorer.Application")
                                    with IE .left=200
                                    .top=200
                                    .height=500
                                    .width=500
                                    .menubar=0
                                    .toolbar=0
                                    .statusbar=0
                                    .navigate "http://127.0.0.1/test.aspx"
                                    .visible=1
                                    end with
                  End If
            Else
                  MyLabel.Text = "post back"
            End If
End Sub
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 

Author Comment

by:matthersjr
ID: 12058954
can't get it to work
0
 
LVL 15

Accepted Solution

by:
Timbo87 earned 500 total points
ID: 12058968
The irony of nauman_ahmed's solution is that it will only work in Internet Explorer. :) There is no way to do it automatically.
0
 

Author Comment

by:matthersjr
ID: 12059040
i can't get to work in ie; get an error
0
 
LVL 18

Expert Comment

by:DotNetLover_Baan
ID: 12059489
starting an IE browser is as good as starting an application/program/exe in the remote client computer. For obvious sequrity reasons, it is NOT possible. Just like, you can not start a PROCESS in asp.net.
-Baan
0
 
LVL 25

Expert Comment

by:nauman_ahmed
ID: 12059492
woops. got caught :D....
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Sometimes in DotNetNuke module development you want to swap controls within the same module definition.  In doing this DNN (somewhat annoyingly) swaps the Skin and Container definitions to the default admin selections.  To get around this you need t…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question