954,585 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

argent help for getting browser name in asp without using js

hello friends...
i want to get the browser name is asp code without using js and include the css file depending upon the browser of the user.
i dont want to use js. because i am unable to include file in js.
what i did in js is ---
var browser=navigator.appName;
var b_version=navigator.appVersion;
var version=parseFloat(b_version);
if(navigator.appName =="Netscape")
{
//document.write("Mozila or Safari")
// want to include css
}
else
{
//document.write("IE")
// want to include css
}

please help.

sbv
Junior Poster
178 posts since Jan 2008
Reputation Points: 15
Solved Threads: 8
 

request.servervariables("HTTP_USER_AGENT")

this detects the current browser. Not version.

SheSaidImaPregy
Veteran Poster
1,080 posts since Sep 2007
Reputation Points: 43
Solved Threads: 68
 

hi
what i did is....

dim UserAgent

UserAgent = Request.ServerVariables("HTTP_USER_AGENT")
Response.Write "" & UserAgent & "


"

if instr(1,UserAgent,"MSIE") > 0 then
Response.Write "Browser is Internet Explorer"
%>

sbv
Junior Poster
178 posts since Jan 2008
Reputation Points: 15
Solved Threads: 8
 

well did it work?

If not, test what HTTP_USER_AGENT puts out and bind MSIE to that.

SheSaidImaPregy
Veteran Poster
1,080 posts since Sep 2007
Reputation Points: 43
Solved Threads: 68
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You