473,480 Members | 1,750 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

how to display values from database tables without using datagrid control

17 New Member
how to display values from database tables without using datagrid control in C# .net.I want to search the values from database & the search results to be shown as rows in the web form,without the use of datagrid.So any one plz help me.
Aug 22 '06 #1
4 6917
nmsreddi
366 Contributor
hi

can u post your query more specific


you just want to avoid datagrid or you dont want to go for any other control like label...or u want to print directly on the web form what actually is your problem



bye
Aug 23 '06 #2
neena
17 New Member
hi

can u post your query more specific


you just want to avoid datagrid or you dont want to go for any other control like label...or u want to print directly on the web form what actually is your problem



bye
Hi
I want to knw,

how to retrieve multiple records from SQL tables using MYSQL data connecter/net and display in html tables without using any data grid. Idon't know how to use the EOF file feature of data set to retrieve the records

Plz help me
Aug 23 '06 #3
Mahesh_Bote
26 New Member
Hi
I want to knw,

how to retrieve multiple records from SQL tables using MYSQL data connecter/net and display in html tables without using any data grid. Idon't know how to use the EOF file feature of data set to retrieve the records

Plz help me

If u don't wants to use grid, the u have to use Table. u have to assign each column value to each cell with the help of loop.

Mahesh
Aug 23 '06 #4
neena
17 New Member
If u don't wants to use grid, the u have to use Table. u have to assign each column value to each cell with the help of loop.

Mahesh
Hi
thanks for the reply.But i am still in doubt :confused:

I want to display the search results in table as rows (like the gmail or yahoo mailbox).I attached my code here.Can i use any array?but i dont know how to apply it here. otherwise for each table row i have to write the code.& it becomes very bulky rt?
So is there any other way?plz help me by giving ur suggestions.

private void Go_Button_Click(object sender, System.EventArgs e)
{
MySqlConnection myConnection=new MySqlConnection(
"server=localhost; userid=root; password=password;database=sales;pooling=false;");

String strSql;

strSql="SELECT name,country,website FROM accounts WHERE name= '" + TxtSearch.Text+ "' AND id='"+Label1.Text+ "'";

MySqlCommand cmd=new MySqlCommand(strSql,myConnection);

MySqlDataAdapter myAdapter=new MySqlDataAdapter(strSql,myConnection);
DataSet sales=new DataSet();
myConnection.Open();
myAdapter.Fill(sales,"accounts");
MySqlDataReader reader;

foreach(DataRow dr in sales.Tables["accounts"].Rows)
{
reader=cmd.ExecuteReader();
reader.Read();
LBL_NAME1.Text=reader["name"].ToString();
LBL_CNTRY1.Text=reader["country"].ToString();
LBL_WEB1.Text=reader["website"].ToString();


LBL_NAME2.Text=reader["name"].ToString();
LBL_CNTRY2.Text=reader["country"].ToString();
LBL_WEB2.Text=reader["website"].ToString();
reader.Close();


}

}
Aug 28 '06 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

3
2190
by: Chumley the Walrus | last post by:
IN my code behind .vb page for a delete records script (this also does a deletion confirmation with a javascript popup, this gets called on my front .aspx page with the datagrid), I'm not sure if...
0
3614
by: Patrick | last post by:
I'm working on a contact management application, and need a hand with one aspect... Here's what I want to create: ------------------------------------ A form split into two parts. There is a...
18
3321
by: Alpha | last post by:
Hi, I'm working on a Windows applicaton with VS 2003 on windows 2000. I have a listbox that I have binded to a dataset table, "source" which has 3 columns. I would like to display 2 of those...
1
5279
by: Craig Banks | last post by:
If a row of data in a dataset has a lot of columns the row displaying the data in a datagrid will run way off the screen. What I'd like to do is display a row of data over several datagrid rows so...
3
1857
by: .Net Newbie | last post by:
I'm new to .Net and need to create a generic (free) way to update lookup tables in SQL Server (using C#) in ASP.Net pages. I found an article at:...
2
2825
by: news | last post by:
hi im new in the .net environnement i have a work to do in school im able to display a datagrid using a database in access and im also able to display a datagrid using a database in foxpro 8.0...
2
570
by: Adda | last post by:
I have a datagrid on a parent mdi form with connection1, dataAdapter1, dataset1. From a main menu I call a child form where I enter new data and update dataset1 with dataAdapter2, connection2 on...
7
2173
by: Aaron | last post by:
Complete code follows. I am new to .NET programming (and programming in general) and I am having a difficult time understanding how to fill a variable in one sub, and then access it from...
0
2830
by: bhavindesai | last post by:
Hello All, Can anybody pleae help me out in this? I have a datagrid control on webpart, in which I am displaying two out of six columns from a dataset. When somebody click on one row, I want to...
0
6908
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
6956
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5342
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4485
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
2997
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
2986
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1300
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
563
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
183
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.