I am building a mobile site with asp.net mvc3 and just getting to know the mvc framework. I have a requirement that I can’t use javascript since some phones are not compatible. I have a form that is being validated on the postback. If validation is invalid I would like to reload the page to the form instead of the top of the page. Is it possible to have my controller tell the view to load to the form id instead of just saying return View("ViewName");?
Thanks for your help,
B
Without javascript your best bet is to use anchors:
When you submit the form it will post to the following url
/Home/Index#foowhich should scroll the browser automatically to the corresponding anchor with this name which is just at the top of the form.