Click here to Skip to main content
15,943,623 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi there!

I am a beginner in ASP.NET. I am creating a student registration page with a ton of information to be added. After, this is entered into the db. Now, i want to create a data view showing all the records like 20 per page. Apart from that, my main concern is implementing the searching. I want the user to be able to search the records using numerous criteria. Therefore, i cannot keep making drop boxes and text boxes for all the criteria the user would wish to search against.

My question is:
I know this is possible but i don't know how, i want the user to click a search button, where the whole data view will become blank except 1 row which will be like an insert row. The user will enter whatever criteria in whatever fields he wishes. On pressing submit, the application will check all the criteria and return the corresponding data and again fill the data view.

I think this was used earlier with the data grid. Kindly assist. This is very urgent.

Thanks in advance.
Posted
Comments
R. Giskard Reventlov 4-Aug-10 10:40am    
What have you already tried? How did that work out? What, if any, problems arose that you'd want to ask a specific question about: we don't do homework (all student/exam systems are homework) and we don't supply complete solutions.

1. Ok. It's urgent to you, but you need to keep patience to get response.
2. You say you need a Search functionality but describe a filter need. What actually you need and what are trying to do? What is the issue?

For search:
Place the controls related to it and then on a button click event. On that event, pass on the control search parameters, use it in query and fetch data, bind it with grid, show it.

For Filter:
You can use the same dataset, just use DataView to filter it and show it in the grid.

Try now!
 
Share this answer
 
Thank you for you response.

Well as far as i remember; the way some did it was:

they had a datagrid with a the data columns lets say for eg:

Age Gender DOB

1. Upon loading the page, the data grid would get all the informationf rom the db and display it.

2. There was an insert option in the data grid to add a new row of information, which would later be stored in the db

3. similar to the insert, i want a search option, when the user clicks search,the datagrid shows no db information, rather than just a table with the columns above and 1 row to enter data.

4. For example:

Age Gender DOB
5

when the user writes the above and presses the ok button, the data grid is again populated with all those with age 5

i want the search functionality in the grid, as i have a table with way too many columns. I do not want to create a seperate out of the grid search.

I hope you get my point

Thnx
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900