P
Phillip Vong
Please some one help me. I'm trying to learn something very very simple and
I just have to see how it's done. If you're using VS2005 or VWD, please
create this very simple asp.net page for me and just past the whole source
code so I can see how it's done.
This is all i want to do.
DB = SQL northwind
Table = Customer
Column = Contact Name
One Textbox = textbox1 with default value of "c"
I just want to see how you can pass a variable to the Select using Like
that contains the value in the textbox1.text. The result will show on a
simple GridView. I know I basically have to do it with parameters and I've
read a lot and tried a lot and can not get it to work. This is the Select
from VS2005. Can someone tell me if this is correct? My peramter name is
@test. The SQLDataSource is fine.
SelectCommand="SELECT [ContactName] FROM [Customers] WHERE ([ContactName]
LIKE '%' + @test + '%')"
Please please please create this simple aspx and paste the whole source code
so I can see how it's done.
Thanks in advance.
Phil
I just have to see how it's done. If you're using VS2005 or VWD, please
create this very simple asp.net page for me and just past the whole source
code so I can see how it's done.
This is all i want to do.
DB = SQL northwind
Table = Customer
Column = Contact Name
One Textbox = textbox1 with default value of "c"
I just want to see how you can pass a variable to the Select using Like
that contains the value in the textbox1.text. The result will show on a
simple GridView. I know I basically have to do it with parameters and I've
read a lot and tried a lot and can not get it to work. This is the Select
from VS2005. Can someone tell me if this is correct? My peramter name is
@test. The SQLDataSource is fine.
SelectCommand="SELECT [ContactName] FROM [Customers] WHERE ([ContactName]
LIKE '%' + @test + '%')"
Please please please create this simple aspx and paste the whole source code
so I can see how it's done.
Thanks in advance.
Phil