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

  • SEARCH
  • Home
  • 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 77181
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T20:47:24+00:00 2026-05-10T20:47:24+00:00

I have a search form in an app I’m currently developing, and I would

  • 0

I have a search form in an app I’m currently developing, and I would like for it to be the equivalent of method='GET'.

Thus, when clicking the search button, the user goes to search.aspx?q=the+query+he+entered

The reason I want this is simply bookmarkable URLs, plus it feels cleaner to do it this way.

I also don’t want the viewstate hidden field value appended to the URL either.

The best I could come up with for this is:

  1. Capture the server-side click event of the button and Response.Redirect.
  2. Attach a Javascript onclick handler to the button that fires a window.location.replace.

Both feel quirky and sub-optimal… Can you think of a better approach?

  • 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-10T20:47:25+00:00Added an answer on May 10, 2026 at 8:47 pm

    Use a plain old html form, not a server side form (runat=server), and you should indeed be able to make it work.

    This could however be a problem if you have an out of the box visual studio master page which wraps the entire page in a server side form, because you can’t nest forms.

    Web forms don’t have to suck, but the default implementations often do. You don’t have to use web forms for everything. Sometimes plain old post/get and process request code will do just fine.

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

Sidebar

Related Questions

I have a search form. I would like when someone type the term, first
I have a simple search form that looks something like: app/views/search/index.html.erb <%= form_for @search,
I have a simple search form that looks something like: app/views/search/index.html.erb <%= form_for @search,
I have a simple search form with a box and a button. <form action
I'm building an advanced search form for my ASP.NET MVC app. I have a
I have a simple search form in my Rails 3 app: <%= form_tag search_path,
I have a simple search form in my Rails 3 app: <%= form_tag search_path,
I have a search form where user can search for products within their specified
I have a search form on my site that submits the url in the
I have a search form with min and max fields. It queries a MySQL

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.