Click here to Skip to main content
15,895,777 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
i am working in asp.net 2.0 and language c# and mysql 5.1 database. i have an text box with name txtKey i want to put any value like 'software'
and then press Search button so that should be show in grid view i am taking gridview and makin connection and parsing query select desg,description,location from job_post where desg like @desg+ '%' and location like @loc+ '%' order by desg add adding parameter like desg parameter source control and control id is txtdsg.text but here its evere showing the syntax error and evere doesn't controlling gridview it's just getting post back when clickink on Search button
Posted
Updated 21-May-10 0:12am
v2
Comments
vikash pathak 21-May-10 5:27am    
i need answer early
Dylan Morley 21-May-10 5:40am    
So you want to search the database, find all records that match what you've entered and display the results in a grid?
Sandeep Mewara 21-May-10 8:19am    
Reason for my vote of 1
1. Needs direct code (see Op's comment to my answer)
2. Demanding... needs an early reply!

So what is the problem?
Looks like you are new to ASP.NET. I would suggest you to buy a beginner book and read before starting to code!

Currently you just need:
UI that has 1 textbox, 1 button, 1 grid.

In code behind, in your button handler you need to get the value of textbox and use it in your SQL query to get search data related to the text. Get the data, bind it with grid. Show it!
 
Share this answer
 
Comments
vikash pathak 21-May-10 6:13am    
Reason for my vote of 2
but i have taken this but dont have codes exactly
Sandeep Mewara 21-May-10 8:21am    
Nobody will provide you the code! You are demanding a code inspite of proving the steps. Why don't you try?
Further, what do mean by 'I need answer early'? Are we at your service here?
What all you have done to implement search functionality.
You just need to read the value from textbox , pass it db which will search and then return the result and now you need to bind it from your gridview.

whats the actual issue?
 
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