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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T23:55:16+00:00 2026-05-12T23:55:16+00:00

i have a search form on every page, hence i put it on the

  • 0

i have a search form on every page, hence i put it on the master page. after adding runat=server to that form i am now unable to use other forms that runat server 😉

how do people usually get around this?

one idea is to surround the whole page with one form runat=server but then i have to have the code in the master page even for those forms that are used on only one sub page (like contact for example).

how do people usually get around this?

thnx

  • 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-12T23:55:16+00:00Added an answer on May 12, 2026 at 11:55 pm

    This has often been considered one of the most problematic design decisions on ASP.NET. It’s a sad thing that you’re kinda fixed to this one-form-per-page principle.

    One reason that you may want to have multiple forms is that the default button will be set by the browser to the submit button. Someone typing into your search box and hitting enter should not submit the main form (suppose that’s the login page), but the tiny form of the search button.

    The easiest and “standard” way to work around this is using an asp:Panel and set the DefaultButton property. This should wrap around the part that includes both the search fields and the search button.

    Don’t worry about coding the <form> from inside the masterpage, surrounding the whole page. That’s a common design. Most server controls require a form, so why not simply include it regardless: it is supposed to be there.

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

Sidebar

Related Questions

I have created a complex sql server 2008/coldfusion search page, that searches thru a
I have a search form on my site that submits the url in the
(Using MySQL and PHP) I have a search form that will allow my users
what I have: a google search form (displayed on all pages) a wordpress page
I have a ASP.NET form that has a search box, with a Go button.
I have a search page where every search result is added to the page
I have two search options: 1. On Master Page there is a text box
I have a php-ajax page that where user writes search string in search.php ,
I have the folowing gsp page: <g:form controller=?? action=??> <h1>Search</h1> <g:submitButton name=search value=Search/> <div
I have a search page that allows the users to filter other users by

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.