I can't find a tutorial anywhere on how to search a sql database using a textbox and a button in asp.net any help. I'm coding in C# Sql database has a customers table I want to display firstname and lastname by searching cust_no
freshfitz
0
Posting Pro in Training
Recommended Answers
Jump to Postu can use this query
select * from customers_table where cust_id='"+txtcustbox.texxt+"'
Jump to Postwhat control u want to display data.there are various ways of displaying data using gridview,datagrid,datalist .. so on.
u need to connect to a database first.
u do that using connection string
SqlConnection conn=new sqlconnection("User ID=sa; Initial Catalog=databasename; Data Source=u r datasource");
after connecting,u need to open itconn.Open();
…
All 5 Replies
greeny_1984
14
Posting Whiz
freshfitz
0
Posting Pro in Training
greeny_1984
14
Posting Whiz
pradeep_skiet
0
Newbie Poster
pradeep_skiet
0
Newbie Poster
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.