•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the ASP section within the Web Development category of DaniWeb, a massive community of 392,036 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 4,308 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our ASP advertiser: Lunarpages ASP Web Hosting
Views: 819 | Replies: 3 | Solved
![]() |
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.
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.
hi
what i did is....
dim UserAgent
UserAgent = Request.ServerVariables("HTTP_USER_AGENT")
Response.Write "<p>" & UserAgent & "</p>"
if instr(1,UserAgent,"MSIE") > 0 then
Response.Write "Browser is Internet Explorer"
%>
<html><head><style type="text/css">
@import url("Home_index_IE.css");
</style></head></html>
<%
else
%>
<html><head><style type="text/css">
@import url("Home_index_NetScape.css");
</style></head></html>
<%
Response.Write "Browser is not Internet Explorer"
end if
%>
what i did is....
dim UserAgent
UserAgent = Request.ServerVariables("HTTP_USER_AGENT")
Response.Write "<p>" & UserAgent & "</p>"
if instr(1,UserAgent,"MSIE") > 0 then
Response.Write "Browser is Internet Explorer"
%>
<html><head><style type="text/css">
@import url("Home_index_IE.css");
</style></head></html>
<%
else
%>
<html><head><style type="text/css">
@import url("Home_index_NetScape.css");
</style></head></html>
<%
Response.Write "Browser is not Internet Explorer"
end if
%>
Last edited by sbv : Jan 28th, 2008 at 1:46 am.
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb ASP Marketplace
•
•
•
•
.net ajax apple asp beta bon browser cross-browser javascript menu with few lines of code custom developer development dom echo email encryption feed firefox internet microsoft mobile mozilla msdn news nintendo office opera patch pda privacy reader safari security skin software spoof sql testing theme url vista weather web webmail wii windows xml xoap
- Previous Thread: submit a field confirmed validation routine
- Next Thread: how to get 1 submit button to validate user's choice



Linear Mode