SixString Posted January 19, 2004 Posted January 19, 2004 (edited) Hi ;) Im having a problem with this kinda simple issue I have a webform with this code : Private Sub Submit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Submit.Click Response.Redirect("~/result.aspx?Search=" + SearchBox.Text) End Sub My problem is that i cant figure out how the code on the "result.aspx" can grab the Request.QueryString("Search") What i have is something like this : Dim strConn As OleDb.OleDbConnection = New OleDb.OleDbConnection(ConfigurationSettings.AppSettings("MyConn")) Dim strSQL As String Dim Search As String Search = Request.QueryString("Search") strSQL = "SELECT ref FROM products WHERE ref LIKE ?" Dim cmd As New OleDb.OleDbCommand(strSQL, strConn) cmd.Parameters.Add("@ref", Search) strConn.Open() Dim rdr As OleDb.OleDbDataReader = cmd.ExecuteReader DataGrid1.DataSource = rdr DataGrid1.DataBind() strConn.Close() Please someone help me whith this??? Thanks in Advance Cheers Edited January 19, 2004 by Robby Quote
Moderators Robby Posted January 19, 2004 Moderators Posted January 19, 2004 try this... strSQL = "SELECT ref FROM products WHERE ref LIKE '%" & Search & "%'" Quote Visit...Bassic Software
Moderators Robby Posted January 19, 2004 Moderators Posted January 19, 2004 You may want to download this sample http://www.xtremedotnettalk.com/showthread.php?threadid=78434 Quote Visit...Bassic Software
SixString Posted January 19, 2004 Author Posted January 19, 2004 Thanks a lot mate ;) I could kiss you ...heheh Cheers Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.