What are your tricks for using a mobile phone with asp.net, I know how to detect a mobile phone, but I'm at a standstill trying to find a good way to show my pages on a mobile device.
I’m thinking of just doing a Multi-View and showing the mobile view when they are mobile, however this will not work with our main page, if I don’t do the same, I would rather just redirect the page to the mobile version,
But I would like this to happen automatically, I don’t need to add code to every page, I used HttpModule, but it makes every object on the website use it, I just want it on aspx pages, so I just used a custom element control, which was placed at the top of the main page.
I also added a folder called mobile in the tree containing folders for each mobile device, so if they go to ~ / Account / Login.aspx, it will be redirected to ~ / Account / Mobile / IPhone / Login.aspx, but I’ll exclude the main page on a mobile device or it will be in an endless loop :)
I like the way MVC does this where they have a custom ViewEngine that just redirects, but I can't go through MVC due to some ASP.NET controls that my company requires.
Ideas?
source
share