You are not logged in. Your edit will be placed in a queue until it is peer reviewed.
We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.
Required fields*
- I understand that PRG is a common design pattern for form submission. In Web forms every page is one form, and having multiple forms on the same page can be a pain. So we tend to use Response.Redirect alot which is a http temporary move.Grim– Grim2018-05-27 22:35:55 +00:00Commented May 27, 2018 at 22:35
- @grim Web forms is trying to simulate building web apps in the same way you'd build a desktop app which relies on event handlers and maintaining client state. If you asp.net server controls what you're seeingis just how it works. You need to remember it predates many current architectures. Of course you don't have to use any server controls but you can't use the builtin event handles. I'm not really sure what your objection is though. There's no rule you can't redirect to the page you're on, and 302 is appropriate.Andy– Andy2018-05-28 22:46:55 +00:00Commented May 28, 2018 at 22:46
- Thanks, Yeah I guess its just the current framework which forces the use of 302 versus more modern frameworks which you tend to use 302's very less often. 302's are bad for SEO, and they are much slower. Seems like web form applications in general tend to use the PRG pattern alot more.Grim– Grim2018-05-29 15:04:46 +00:00Commented May 29, 2018 at 15:04
- @Grim I think you're overly worried about 302s; especially after a form post, since search engines don't post to forms anyway, so what happens after a post is irrelevant. I'm not sure what you're comparison for speed is either. Server.Transfer has its own issues/limitations as well. Even if you were doing MVC, best practices would still have you do post/redirect/get.Andy– Andy2018-05-29 22:50:55 +00:00Commented May 29, 2018 at 22:50
Add a comment |
How to Edit
- Correct minor typos or mistakes
- Clarify meaning without changing it
- Add related resources or links
- Always respect the author’s intent
- Don’t use edits to reply to the author
How to Format
- create code fences with backticks ` or tildes ~ ```
like so
``` - add language identifier to highlight code ```python
def function(foo):
print(foo)
``` - put returns between paragraphs
- for linebreak add 2 spaces at end
- _italic_ or **bold**
- indent code by 4 spaces
- backtick escapes
`like _so_` - quote by placing > at start of line
- to make links (use https whenever possible) <https://example.com>[example](https://example.com)<a href="https://example.com">example</a>
How to Tag
A tag is a keyword or label that categorizes your question with other, similar questions. Choose one or more (up to 5) tags that will help answerers to find and interpret your question.
- complete the sentence: my question is about...
- use tags that describe things or concepts that are essential, not incidental to your question
- favor using existing popular tags
- read the descriptions that appear below the tag
If your question is primarily about a topic for which you can't find a tag:
- combine multiple words into single-words with hyphens (e.g. design-patterns), up to a maximum of 35 characters
- creating new tags is a privilege; if you can't yet create a tag you need, then post this question without it, then ask the community to create it for you