How to Bind Data in DropDown and Grid In classic Asp?
Hello I m new with asp scripts i have not mores ideas as well in asp. i have worked in asp.net. Now I facing a problem to bind data with开发者_如何学Go DropDown and Grid. Please suggest me any ideas to bind data with drop down. And second thing how can i want to bind data with Grid with sorting feature.
Please Suggest me Idea to do this.
Classic ASP has no support for binding.
You best bet is using some jQuery Table plugin that supports sorting (like DataTables or others), but you will need to do the data population yourself.
for a drop down
datasource = execute.sql
<select id="">
<% for loop iterating through datasource%>
<option value="<%=datasource("value")%>"><%=datasource("text")%></option>
<%end%>
The above answers are technically incorrect. Classic asp did have support for binding. But it wasn't good. It was the InterDev drag and drop controls. See: http://msdn.microsoft.com/en-us/library/aa260778(v=vs.60).aspx "Introduction
The Grid Design-Time Control (DTC) is a Microsoft® ActiveX® control that creates HTML tables. The Grid DTC is a data-bound control that uses the Recordset DTC to retrieve data from a data source and displays the information in an HTML table."
But it is multiple versions of obsoleted, and is 1998 technology. So even though it exists, pretend that it doesn't and don't try to use it.
精彩评论