Can anybody suggest me which is the better place to verify mobile browser and redirect to mobile site.
I am thinking of using DetectMobileBrowsers
to verify mobile browsers.
And I am thinking of doing this in Application_Start
or Session_Start
. Please suggest me which is the better place to do the same.
This is my Session_Start block
Protected Sub Session_Start(ByVal sender As Object, ByVal e As EventArgs)
' Fires when the session is started
'Dim request As HttpRequest = HttpContext.Current.Request
'If request.Browser.IsMobileDevice Then
' Response.Redirect("http://localhost:26270/Default.aspx")
'End If
Response.Redirect("http://google.com")
End Sub
Thanks