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 208681
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T17:50:51+00:00 2026-05-11T17:50:51+00:00

I have two controls on a page, one is a search entry and submission

  • 0

I have two controls on a page, one is a search entry and submission control the other is the search results control, they have to be separated due to the layout of the site. Im looking at different ways of having the search control submit displaying the search results in the results control, initially im not bother about postbacks, im more bothered about two things

1) How do i pass the selected search terms back to the same page (or indeed to the control that displays the results) QUerystring, hiddenfield, session, viewstate (effectively hidden field)?

2) how do i actually make the page submit to itself.

apologies if this is a bit basic but im not an ASP.Net expert

  • 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. Editorial Team
    Editorial Team
    2026-05-11T17:50:51+00:00Added an answer on May 11, 2026 at 5:50 pm

    There are many, many ways for doing what you are asking and to be honest I’m not sure that there is a right answer. It all depends on your development style and the problem that you are trying to solve.

    I have a fair amount of experience with regards to writing search interfaces and in my opinion using the query string is a good way of passing search criteria. However this has its advatages and its disadvantages.

    Pros:

    • You can get to a search results page from anywhere in your site or an external site simply by passing a query string.

    • Your search results can be crawled easily as they are just pages on your site.

    • Query strings are fairly simple to use.

    • The user can see what it is they are searching for in the query string. (However this might be a bad thing depending its use.)

    • Users can book mark thier serach results (Thanks Fredrik Mörk)

    Cons:

    • You might have to take the time to make your search criteria look pretty. I.E. Do you want your users just to see an id that means nothing to them?

    • You may have problems html encoding your search criteria as they will need to be passed as a query string argument. Encoding can be done easily but it can cause you a headache if you are using reserved characters for other things.

    • Your users can see what they are searching for. (Like I said this might be a good or a bad thing.)

    • Your query string might become far too long.

    There are probably some other things that I have not thought of but that gives you an idea.

    As for posting a page back to itself again there are a few ways of doing this but try a submit button or anchor tag with a # sign as the href attribute.

    Another thing to think about might be using a url rewriter to make your ugly query string a nice looking URL.

    For example:

    used_car_search.aspx?make=ford&model=focus

    Could become:

    used_ford_focus.html

    Happy coding 🙂

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

Sidebar

Related Questions

I have two forms on one page: a results form and a search form.
I have two SqlDataSource controls on a page. One loads high level data and
I have two custom controls that are analogous to a node and the control
I have two different grid controls on the same form. They share the same
I have added two user control to the project. One is for portrait and
I am using standard windows forms controls under C#. I have two controls which
I have two TDBLookupComboBox controls that I'd like to connect to the same dataset,
I've got a form where I have two radio buttons and two interchangeable controls
Simple ASP.NET application. I have two drop-down controls. On the first-drop down I have
I've got two Silverlight Controls in my project, both have properties TeamId. I would

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.