Last post Feb 07, 2015 02:14 PM by Mikesdotnetting
Feb 07, 2015 01:54 PM|mdehghani|LINK
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?
Feb 07, 2015 02:14 PM|Mikesdotnetting|LINK
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.