Click here to Skip to main content
15,891,906 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
HI
how to get Mysql single row value from asp.net code behind into html page to display (or i need to use asp:Repeater for single value also)

Pls advice

----------------------------------------------------

I have written mysql query and it gives me one row

now to show values in aspx page from aspx.cs page

(if i have multiple values , i use asp:repeater )

but what for single row




regards

maulik shah
Posted
Updated 23-Dec-13 0:42am
v2

That should not create a issue. When it will return one row, the Repeater should show only one row.

Otherwise, you can check the number of rows returned and according to the count, you can decide whether to use Repeater or any other control like Label or something.
 
Share this answer
 
Reiterating on what Tadit has pointed out, its just our decision how to display or represent data in any format. Some of the data listing controls are meant for that as well as it saves lots of time on designing layout compared to displaying data/row in labels , literals etc because of the different templates these controls have.

So if its one row to be displayed DetailView , FormView or Repeater controls can still be used.
 
Share this answer
 
v2

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