Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 165273
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T11:53:31+00:00 2026-05-11T11:53:31+00:00

When the user select an item from a dropdownlist and presses a button, my

  • 0

When the user select an item from a dropdownlist and presses a button, my application shows a list of data manually binded and filtered according the selected value. If the user presses the Refresh button of the browser, it asks for confirmation whether the user is sure they want to submmit the query again.

I don’t want the browser asks this. How can I avoid this behaviour?

As far as I understand, this can be done implementing the post/redirect/get pattern, but I don’t know how to do it in ASP.NET 3.5.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T11:53:31+00:00Added an answer on May 11, 2026 at 11:53 am

    Yep, something like this will do the job for you, in your page load event for example:

    // Check to see if the user submitted the form: if (Page.IsPostBack){   // Get the Params collection - query and forms   NameValueCollection params = Request.Params;   StringBuilder query = new StringBuilder();    // Iterate over the params collection to build a complete   // query string - you can skip this and just build it   // manually if you don't have many elements to worry about   for(int i = 0; i <= params.Count - 1; i++)   {     // If we're not on the first parameter, add an & seperator     if (i > 0){       query.Append('&');     }      // Start the query string      query.AppendFormat('{0}=', params.GetKey(i));      // Create a string array that contains     // the values associated with each key,     // join them together with commas.     query.Append(String.Join(',', pColl.GetValues(i));   }    Response.Redirect(String.Format('{0}?{1}',                        Request.Url.AbsolutePath, query.ToString())) } 

    The other problem with this pattern is that you’ll end up with this additional redirect in the history which might cause the users to have to click back twice to get back to your search form.

    On the plus side, they can now bookmark the results page quite happily and return to their results without having to re-submit the form.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 75k
  • Answers 75k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer Be aware that showModalDialog is IE specific and won't necessarily… May 11, 2026 at 2:36 pm
  • added an answer The VBA project itself is protected by a password which… May 11, 2026 at 2:36 pm
  • added an answer You could write a Visual Studio add-in to do this,… May 11, 2026 at 2:36 pm

Related Questions

I'm writing my first app with ASP.NET MVP (attempting Supervisory Controller) and Unit Testing
I know in ASP.NET I can get an item from a DropDownList by using
I have a asp.net web page with place holder control and Menu control when
I am trying to create a sidebar for a site that will allow a

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.