Would it be possible to override the call to:
return View()
To append the string “mobile_” to the name of the view file, in other words, instead of calling the view “index.aspx” use “mobile_index.aspx”.
Somewhere else I guess in a before action fires event I will check if its a mobile application, set a flag. So if the flag is set, it should append “mobile_” to the view name.
And I want this done at the controller level and not have to do this for each action.
What you want to achieve has been implemented by Stackoverflow.
I was trying to do the same recently and I bumped into this article.
It’s really interesting and goes on the same road you want to follow.
At the end I decided to implement for my implementation to go this way.