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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T14:17:10+00:00 2026-06-08T14:17:10+00:00

[Form]: ![Form to be Considered][Form] [Form]: I have these form from Access. Here, I

  • 0

[Form]: ![Form to be Considered][Form]

[Form]:Access Form

I have these form from Access. Here, I am developing search application on asp.net. I have 2 heavy databases with same data structure in which one database include approx 12000 fields and another has approx. 9000 records. I want to do search records with any criteria say,

Dealer Number = 3123 and DLicenceNo = 3242314

Here, I am assuming that if user provides a field text, that only considered to be search, and others to be ignored.

Is there anyway to build query for this rather using long if clauses?

  • 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-06-08T14:17:11+00:00Added an answer on June 8, 2026 at 2:17 pm

    Probably needs some tweaking but, start by naming all your textbox controls your column names in your database

    var conditionals = new Dictionary<string, string>();
    
    foreach(Control c in Page.Controls)
    {
        if (c is TextBox)
        {
            if (!String.IsNullOrEmpty(c.Text))
                conditionals.Add(c.Id, c.Text);
        }
    }
    

    From there you could be VERY careful to build a query that only has the right where clauses based on your conditionals dictionary. Ideally you can make sure it’s parameterized some how to avoid all worries of SQL Injection.

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

Sidebar

Related Questions

I have a classic asp application. I want to post a contest form from
Our vendor-created platform is asp.net based and I am developing customizations in the form
For practicing purposes, I’m about to create a new ASP.NET MVC 3.0 application. My
I have a form with various controls. One of these controls lets the user
Hey. We're building a large ASP.NET website, and have hired an external firm to
I have a search function that returns an arraylist of objects to my form.
Is having tags inside a jstl tag considered bad form? So for example I
Consider the following: <form runat=server> <div> <asp:TextBox runat=server ID=tb1 /> <asp:Button runat=server ID=b1 OnClick=b1_Click
Form is made from a function that prints out all rows that are awaiting
I have these entity kinds: Molecule Atom MoleculeAtom Given a list(molecule_ids) whose lengths is

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.