I have two textboxes Textbox1 and Textbox2 and 1 gridview
i want my site users may search record either by entering the city name in textbox1 or by entering the country name on textbox2 via gridview .
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
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.
There’s a whole lot more information we need to help answer this in detail.
In general, you need to take the values in the textboxes, convert them into a SQL query which is sent to the database and bind the resultset which is returned to you gridview.
Depending on what data access mechanism you’re using, how to achieve this varies greatly – If you don’t know what data access mechanism exist, I’d suggest you start reading up on LINQ-To-SQL as it’s pretty easy to use and safe against SQL injection attacks.
If you can provide more details of what you’re trying to accomplish, we may be able to help further eg: