what i am trying to achieve is simple; Among all the view which i have in my web application, i have only two razor views that i have created a mobile version for them.
so i need to redirect the users to these views if they are accessing the application from their mobile devices. i tried the following on the controller level but it did not redirect the users when i run my test on different mobile devices :-
if (Request.Browser.IsMobileDevice)
{
return View("MobileStudentStartAssessment");
}
else {
return View("StudentStartAssessment");
}
So is there another approach that i can follow which can detect most of the mobile devices?
Thanks
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…