I have a DNN site with a Razor script on it. Currently, I have it so there is a drop-down and a submit button midway down a page of text. The user selects an options and hits the "Submit" button. The method is POST so that when the page reloads, I use "if (IsPost)" to display a image based on the selection.
I would like the page to automatically redirect down to where the drop-down and image are located instead of having to scroll back down to see it. I believe this is do-able with GET but then I cant use the IsPost to catch the POST back and display the corresponding image.
Any alternative way of doing this?
You have a number of options that you could use for this. One route would be to use an Ajax submit and then handle a lot of it on your own.
Another route would be to render a single line of Javascript when the IsPost condition is true, assume that you have an anchor defined with an id of imageView you can use
location.hash = '#imageView';
This would scroll the user to that position