how to display datas from database in ASP.NET

mrani

Member
Joined
Jul 13, 2005
Messages
6
Programming Experience
Beginner
hi all

i' have a combobox in which all the "Emp_names" are coming from database but i also want that after selecting any name all the relevent datas that are stored in the database should come in that particular textboxes.

i have used datareader for that but it doesn' t work.also by dataset i want to display that records but it doesn't work.
tell me some different way by which i can fetch that data from databse.plz reply it as soon as possible.

thanx
mrani
 
Dim AuthCheck As New MySql.Data.MySqlClient.MySqlConnection(Conn)
Dim AuthGo As New MySql.Data.MySqlClient.MySqlCommand("Auth", AuthCheck)
AuthGo.CommandType = Data.CommandType.Text
AuthGo.CommandText =
"Select notes from access "
Dim AuthGoAdapter As New MySql.Data.MySqlClient.MySqlDataAdapter(AuthGo)
Dim AuthSet As New Data.DataSet()
AuthGoAdapter.Fill(AuthSet)
GridView.DataSource = AuthSet

Would populate the DataGrid GridView with the dataset AuthSet.

Not sure if that will help you any.
 
in the selectedindexchange event of the combobox, catch the text or value of the combobox, pass that value in the query, execute the reader, then assign the value to needed control it may be grid, or any control
 
Back
Top