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?
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?
Try the following:
Set IE = createobject ("InternetExplorer.Applica tion")
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
Set IE = createobject ("InternetExplorer.Applica
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
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.MajorVersi on < 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.Applica tion")
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
---
Sub Page_Load(Sourec As Object, E As EventArgs)
If Not IsPostBack Then
If Request.Browser.Browser = "IE" Then
If Request.Browser.MajorVersi
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.Applica
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
ASKER
can't get it to work
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
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
-Baan
woops. got caught :D....
-Nauman.