943,682 Members | Top Members by Rank

Ad:
  • ASP.NET Discussion Thread
  • Marked Solved
  • Views: 462
  • ASP.NET RSS
Sep 11th, 2009
0

Searching Record with ASP.Net

Expand Post »
Hello. My project required me to search the record inside the database. What I mean is I save the text field of a session like Session["Example"] = "ex". Then using this session to search inside the field of table of SQLDataSource. If the session match the field, then display the text that match and increase the match integer, if not let the match = 0. I already got the SqlDatSource with the default Select Statment is "Select * From table".
Reputation Points: 10
Solved Threads: 0
Newbie Poster
NguyenThai is offline Offline
15 posts
since Sep 2006
Sep 12th, 2009
0

Re: Searching Record with ASP.Net

Hi
If i understood u correctly, u need to search records based on your Query value stored in session("Example").

Write: "select * from mytable where mycolumn like '%" & session("Example") & "%' "

Then bind your resultset to gridview

Mark as solve if it helps you!!!
Regards
Reputation Points: 12
Solved Threads: 38
Junior Poster
reach_yousuf is offline Offline
194 posts
since Sep 2007

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in ASP.NET Forum Timeline: Javascript Codes Don't Run!
Next Thread in ASP.NET Forum Timeline: Pulling from two SQL tables and displaying data





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC