Searching Record with ASP.Net

Please support our ASP.NET advertiser: Intel Parallel Studio Home
Thread Solved

Join Date: Sep 2006
Posts: 15
Reputation: NguyenThai is an unknown quantity at this point 
Solved Threads: 0
NguyenThai NguyenThai is offline Offline
Newbie Poster

Searching Record with ASP.Net

 
0
  #1
Sep 11th, 2009
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".
Reply With Quote Quick reply to this message  
Join Date: Sep 2007
Posts: 66
Reputation: reach_yousuf is an unknown quantity at this point 
Solved Threads: 12
reach_yousuf reach_yousuf is offline Offline
Junior Poster in Training

Re: Searching Record with ASP.Net

 
0
  #2
Sep 12th, 2009
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
Yousuf
Software Developer
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the ASP.NET Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC