check for system type

Results 1 to 2 of 2

Thread: check for system type

  1. #1
    Join Date
    Dec 1969

    Default check for system type

    i need to do a request which checks for sytem type and redirects accordingly. heres what i&#039;ve got so far:<BR><BR>Dim strAgent as String = _ <BR>Request.ServerVariables("HTTP_USER_AGENT") <BR> <BR>response.write(strAgent)<BR><BR>gives me this:<BR>Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; DigExt; YComp <BR><BR>here&#039;s my stab at a solution:<BR><BR>Dim strAgent as String = _ <BR> Request.ServerVariables("HTTP_USER_AGENT") <BR> <BR>if (strAgent = "Windows") then<BR>Server.Transfer("windows.aspx")<BR>else<BR >Server.Transfer("mac.aspx")<BR>End if<BR><BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: check for system type

    You probally want something along the lines of<BR><BR>if Microsoft.VisualBasic.InStr(strAgent, "Windows") &#062; 0 then<BR>&nbsp;&nbsp;server.transfer("windows.aspx" )<BR>else<BR>&nbsp;&nbsp;Server.Transfer("mac.aspx ")<BR>end if

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts