Link to home
Start Free TrialLog in
Avatar of matthersjr
matthersjr

asked on

auto launch IE if using a different browser type

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?
Avatar of nauman_ahmed
nauman_ahmed
Flag of United States of America image

I dont think that it will be allowed unless you write a VBS for it.

-Nauman.
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
Avatar of matthersjr
matthersjr

ASKER

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
can't get it to work
ASKER CERTIFIED SOLUTION
Avatar of Timbo87
Timbo87

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
i can't get to work in ie; get an error
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
woops. got caught :D....