Click here to Skip to main content
15,920,031 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
i want to display my database records on lable in table format.. plz suggest me

What I have tried:

i don't know how to do that...
Posted
Updated 10-Jul-17 23:57pm

You don't - a label is a small control intended to to display a single piece of information. You need a control which supports row and column based data (just like your database does) such as a GridView or DataGridView depending on the environment your code is written to run under - web based controls are different from WinForms, which are different from WPF, UWP are yet again different, and so on.

Start by looking at the Toolbox in VS and see what controls you have available, then look at the MSDN documentation for them.
 
Share this answer
 
 
Share this answer
 
Use GridView with <templatefield><itemtemplate> and bind each column value to the label.

refer below article for more details.
Set value for asp:Label inside gridView asp:TemplateField | The ASP.NET Forums
 
Share this answer
 
not like that sir,each cell value on each lable..like that way i want to display th database records
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900