Hey guys, I have a recordset, a repeat region and a select tag (drop down), options repeat in a repeat region and everything works fine but there is still a little problem here, i can manage to sort course_title records (options) by id (ASC or DESC) but I don't want that I want the course_title records to sort by alphabetical order from a-z.
My table image attached to this post (as you see in that image i want course_title to sort alphabetically).
Here is my recordset and repeat region
Here is my select tag and option with repeating region:
Thanks folks ...
My table image attached to this post (as you see in that image i want course_title to sort alphabetically).
Here is my recordset and repeat region
Code:
<% Dim rs_cat Dim rs_cat_cmd Dim rs_cat_numRows Set rs_cat_cmd = Server.CreateObject ("ADODB.Command") rs_cat_cmd.ActiveConnection = MM_admin_ivu_STRING rs_cat_cmd.CommandText = "SELECT * FROM dbo.cat_course ORDER BY course_ID DESC" rs_cat_cmd.Prepared = true Set rs_cat = rs_cat_cmd.Execute rs_cat_numRows = 0 %> <% Dim Repeat1__numRows Dim Repeat1__index Repeat1__numRows = -1 Repeat1__index = 0 rs_notice_numRows = rs_notice_numRows + Repeat1__numRows %>
Here is my select tag and option with repeating region:
Code:
<select name="course_ID" class="styled" id=""> <option value="" selected="selected" class="height_options" disabled="disabled" onchange="callSite(this)"><<< Please Choose Category >>></option> <% While (NOT rs_cat.EOF) %> <option value="<%=(rs_cat.Fields.Item("course_ID").Value)%>" class="height_options"><%=(rs_cat.Fields.Item("course_title").Value)%></option> <% rs_cat.MoveNext() Wend If (rs_cat.CursorType > 0) Then rs_cat.MoveFirst Else rs_cat.Requery End If %> </select>
Thanks folks ...
Comment