.NETGURU
Sniff Platform with C#
Messages   Related Types
This message was discovered on ASPFriends.com 'aspngcs' list.
Responses highlighted in red are from those people who are likely to be able to contribute good, authoratitive information to this discussion. They include Microsoft employees, MVP's and others who IMHO contribute well to these kinds of discussions.

Bryan Andrews
-- Moved from [aspngclient] to [aspngcs] by Yannick Smits <Click here to reveal e-mail address> --

I am trying to do this:

if (Request.Browser.Platform == "Win")
{
//Do Something            
}

And have it recognize anything with win in it. Same with Mac...

How can I perform this Instring type function?

Thanks.

Reply to this message...
 
    
Yannick Smits (VIP)
Try this:
if (Request.Browser.Platform.IndexOf("Win") > 0)

hth,
Yannick Smits

----- Original Message -----
From: "Bryan Andrews" <Click here to reveal e-mail address>
To: Click here to reveal e-mail address
Sent: Tue, 6 Aug 2002 16:42:03 -0400
Subject: Sniff Platform with C#
[Original message clipped]

Reply to this message...
 
    
Bryan Andrews
Did not seem to work. Is this supposed to be > 1 if there is Win =
anywhere in the platform name?

Thanks!

-----Original Message-----
From:     Yannick Smits [mailto:Click here to reveal e-mail address]=20
Sent:    Tuesday, August 06, 2002 6:42 PM
To:    aspngcs
Subject:    [aspngcs] Re: Sniff Platform with C#

Try this:
if (Request.Browser.Platform.IndexOf("Win") > 0)

hth,
Yannick Smits

----- Original Message -----
From: "Bryan Andrews" <Click here to reveal e-mail address>
To: Click here to reveal e-mail address
Sent: Tue, 6 Aug 2002 16:42:03 -0400
Subject: Sniff Platform with C#
[Original message clipped]

| [aspngcs] member Click here to reveal e-mail address =3D YOUR ID
| http://www.asplists.com/asplists/aspngcs.asp =3D JOIN/QUIT

Reply to this message...
 
    
Mark Bruce
try this
if (Request.Browser.Platform.IndexOf("Win") >= 0)

Bryan Andrews wrote:Did not seem to work. Is this supposed to be > 1 if there is Win anywhere in the platform name?

Thanks!

-----Original Message-----
From: Yannick Smits [mailto:Click here to reveal e-mail address]
Sent: Tuesday, August 06, 2002 6:42 PM
To: aspngcs
Subject: [aspngcs] Re: Sniff Platform with C#

Try this:
if (Request.Browser.Platform.IndexOf("Win") > 0)

hth,
Yannick Smits

----- Original Message -----
From: "Bryan Andrews"
To: Click here to reveal e-mail address
Sent: Tue, 6 Aug 2002 16:42:03 -0400
Subject: Sniff Platform with C#
[Original message clipped]

| [aspngcs] member Click here to reveal e-mail address = YOUR ID
| http://www.asplists.com/asplists/aspngcs.asp = JOIN/QUIT

| [aspngcs] member Click here to reveal e-mail address = YOUR ID
| http://www.asplists.com/asplists/aspngcs.asp = JOIN/QUIT

---------------------------------
Do You Yahoo!?
Yahoo! Health - Feel better, live better
Reply to this message...
 
 




ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
Ad


Need Dot Net Interview Questions?
Ask ExamGuru, Inc. for advice and help on Passing .Net Interviews
.Net Projects
Best-of-breed application framework for .NET projects, developed by ExamGuru, Inc. and ExamGuru IT
Free .net Help
Commission ExamGuru, Inc. and his team for your next bespoke software project
FogBUGZ
The only bug tracking system carefully crafted with one goal in mind: helping teams create great software.
Awesome Tools
If you don't know about these, you're missing out... IT Certification Questions
IT Interview Questions
Free Oracle 10g Training
MCSE Boortcamp
Cisco Study Guides
Cheap Study Guides
Exact Questions
Dot Net Interview Questions
Oracle OCP
Cheap Travel
Designer Perfumes - Wholesale Prices
Free Programming Tutorials
 
ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
 Copyright © ExamGuru, Inc. 2001-2006
Contact Us - Terms of Use - Privacy Policy - www.dot-net-guru.com - www.examguru.net - www.oraclesource.net - www.itinterviews.net - www.examguru.net/ITCertification