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".

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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.