From viewing page you can use code similar to this Dim trans_id As Integer Dim dgrCode As Label = E.Item.FindControl("lblCode") trans_id = CType(dgrCode.Text, Integer) Server.Transfer("EditList.aspx?&trans_id=" + trans_id.ToString(), True) which does this: reads value from control named lblCode. Since I needed to transfer this value to next page as integer, I casted it. Last line of code redirects user to "edit list" page along with value from the control In Edit List page under Page Load or somwhere else have line similar to this. lblTest.Text = Request.Params.Get("trans_id") What this does: it reads a parameter sent from viewing page and assign its value to text box. I hope this gives you the general idea Srdjan
MontenegroATL
Posts
-
checkbox control and rowID -
Query SQL DB from VB.NETHello, I am playing with ways to set query command in VB.NET to retrieve set of records from SQL DB. I know basic sytanx and it works well. However I can not get this to work. I have a textbox where users enters a name of broker and then when clicks Search button, data grid gets populated with all broker info. This works well if name that user entered exists in SQL DB. My goal was to have this same result, but when users enters partial name too. Example: Full broker name: Mike Tyson Partial broker name: Mi This is the string I used but it does not work: Dim strSQL As String = "SELECT * FROM broker where name like '" & strName& "%'" This returns error : Index was outside the bounds of the array. If I enter this command directly in SQL Analyzer as SELECT * FROM broker where name like 'Mi%' it works just fine. What I am missing???