Click here to Skip to main content
15,896,726 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi i select data( image, price ,name) of product from database and displayed it in datalist.the problem is i want to sort that data acording the price acsenging and decsending but i don not what i do
i used order by in select statement but it did not work correctly with number
Posted

1 solution

Check the type of the price column. Make sure it is a number type (int / decimal) etc and not varchar.
 
Share this answer
 
Comments
fjdiewornncalwe 28-Jun-11 10:17am    
Excellent advice.
Abhinav S 28-Jun-11 10:20am    
Thank you Marcus.
shimaa010 28-Jun-11 11:37am    
thanks for advice i changed the type and it work correctly
Abhinav S 28-Jun-11 12:51pm    
You are welcome. Vote if it helped!

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