Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

buildlistbox function

Status
Not open for further replies.

developer77

Programmer
Nov 20, 2006
18
US
Hello everyone,

I dont' even know if I'm in the right forum. I think the language I'm working w/here is asp, not sure. I have the following line in an asp file:


<%
Response.write BuildListBox2("<- Select Value ->", sp_GetStudentType", DB_CONNSTR_STUDENT, "Type", "","", false)
%>


I also have this line declared in the code:


dim sType : sType = oStudentInfo ("Type").Value


I didn't write this code but I need to change the buildlistbox function so that the value for sType is the default value that comes up in the listbox instead of
<- Select Value ->. I would like <- Select Value -> to still be the first in the dropdown list but when the user goes to the form, the sType value should be the default one there. Can you please help me with this?

Thanks,
Jackie
 
Somewhere in the BuildListbox2 function there is code to build an OPTION tag. You need to do two things. Add an argument to the function for the selected student type, that is you will pass sType into the function. And you need to add logic to add the SELECTED attribute to the OPTION which matches sType.

Unless, you are actually working with ASP.NET, in which case you should post your question in that forum.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top