It appears that I have a page with 2 views. When you refresh the page, the postback is initially false. However, after clicking a submit button, the postback becomes true, and the 1 view changes to view 2. Now, when you refresh the page again, the postback is true, but i want it to be false.
- Initially, after refreshing the page, the postback is false.
- After submitting the form, the postback becomes true, and the view changes.
- Subsequent page refreshes result in a true postback, but i want it to be false.

Tuhin PaulPosted Feb 2, 2024, 2:17 PM
After processing the form submission, use the Post-Redirect-Get pattern. This involves redirecting the user to another page (typically the same page) after a successful form submission. This way, when the user refreshes the page, it won't trigger another form submission.
Jignesh KumarPosted Feb 2, 2024, 8:00 AM
Hello Ishika,
you need to check your page is loaded first time or nor, in this case
If the page is loaded for the first time or is refreshed without triggering a postback,
IsPostBackwill befalse.IsPostBackwill not always betrueon every refresh in ASP.NET WebForms. It will betrueonly when the page is loaded in response to a postback.