How to display 2 column Dropdown List ASP classic

tr1p0d

New Member
Hi hope some one can help me i am currently transforming systems that was made in accessand i am reprogramming all web based using ASP classic. I'm in a little snag and i really looked all over the web for this for the passed 2 days and no luck. what i am trying to accomplish is a drop down list that as 3 simple column like the current systems in Access so say i am looking for the follow output in the HTML select list.chose a company\[code\]walmart 25 street Montreal crazy man 36 bad street Lavalbad company 36 ethos street app 32 Quebec hello world 36 apples Toronto\[/code\]this output comes from a MS-SQL database. I tried the following. counting how much characters are in the company name (say..20 chars) then I want to add equal spaces to the company name so say (100 chars)in this case i will would take the amount (100-20) and add this the the company namethan take the name of the company and join it to the address and town. each time i go threw the loop i redo the calculation.this is all done in asp classic here is the code \[code\]<select id="search_Comp" name="search_Comp"><option value="http://stackoverflow.com/questions/14614455/0">---</option><%'loopwhile not RS.EOF'check if the company name is smaller than 100 charactersif len(RS("Comp_Name")) < 100 then 'calculation of the padding whiteSpaceSize = 100 - len(RS("Comp_Name"))end if 'create the spaces neednameCompSP = space(whiteSpaceSize)'add the spaces to the company name nameComp = trim(RS("Comp_Name")) & nameCompSP'replace for spaces for html outputNnameComp = replace(nameComp," ","&nbsp;")%><option value="http://stackoverflow.com/questions/14614455/<%= trim(RS("Comp_ID"))%>"><%=NnameComp %><%= trim(RS("Comp_CAdd1"))%></option><%RS.MOVENEXTwend %></select>\[/code\]this outputs the spaces but they still don't line up ! I tryed with SQL too but didn't work --here is the querie exemple ---\[code\]SELECT Comp_Name+ SPACE (100
 
Top