StealthRT Posted June 30, 2004 Posted June 30, 2004 I need some help with this code for vb.net. I have an ASP page (index.asp) and i found this code that if you view my site on a cell phone, it would redirect you to the cell phone (WAP) version of the site. Sub Page_Load() Dim isPPC Dim httpAccept As String isPPC = Request.ServerVariables("HTTP_UA_OS") httpAccept = LCase(Request.ServerVariables("HTTP_ACCEPT")) If InStr(isPPC, "POCKET PC") Then response.redirect("--your PocketPC page--") Else If Instr(httpAccept,"wap") Then response.redirect("--your WAP page--") End If End If End Sub Now i am new at .net programming but i have a good grasp on ASP now. I need to know where i need to put that code in my asp page. Ive tryed the code with the <% %> at the start and ending of it at the very top of my asp page, but it still loads up the normal site on my cell phone. If anyone knows how to correct this, please let me know :) David Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.