preventing markup execution after submitting form RRS feed

  • Question

  • User-2060576634 posted

    why does the parser execute the top of the markup after a form is submitted even though i have put a redirect command at the end of the if IsPost code block? and how can i prevent it? I temporarily prevented the top lines from being executed twice by putting conditions but isn't there a better way?

    Saturday, February 7, 2015 1:54 PM


  • User-821857111 posted

    If you only want code to be executed under certain conditions, you need to code those conditions. If you do not want code to be executed when the form has been submitted, eitehr put it after the Response.Redirect call or put it in an if(!IsPost) block. 

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Saturday, February 7, 2015 2:14 PM