Quick question, I have tried figuring this out myself, but the use of Session Variables can be confusing when trying to figure out why or how a page is reloading and doing/not doing what it is supposed to do.
Does a page reload (with JavaScript, f5, ctrl+f5, browser reload button, etc) ever, under any (non-scripted) circumstance cause a form repost?
(This pertains to using IfPost branches within C# code like the example code below):
if(IsPost)
{
//stuff that only executes if the previous request was a post.
}
I just kind of need to know what to expect here so I can properly diagnose my session state problems.
Thanks for any help!
(Also, sorry if I am oversimplifying this question. I realize that it 'may' be more complicated than a simple answer can provide).
******UPDATE**********
Also, I looked for copies of this question here, on StackOverflow, but I didn't see anything, so if this is a duplicate question, I apologize.
Both of the answers here are good answers. I accepted the answer that also offered a solution to my question, and while PRG is not the 'only' way to do it, it seems like it may be the best. It also seems a growing way to handle client-side user-friendliness, and imho, seems like it would be a great habit to get into.
Thanks for showing me that!
Question&Answers:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…