correct the code
string query ="SELECT * FROM lwpos_categories ORDER BY name WHERE parent_id= " + ddlCategory.SelectedValue ;
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Jaimin ShethiyaPosted Nov 25, 2019, 3:35 AM
can you please try below code and let me know if not working.
string query = "SELECT * FROM lwpos_categories WHERE parent_id = " + ddlCategory.SelectedValue + " ORDER BY name ";
Order by clause used in SQL side after the where condition if you used where clause in query.
and defualt is asc order of you not write asc keyword in query.
Thanks
Mageshwaran RPosted Nov 23, 2019, 11:27 PM
Dhara PatelPosted Nov 23, 2019, 9:31 AM