Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > Retrive the items in list box

Reply
Thread Tools

Retrive the items in list box

 
 
Amit Shinde
Guest
Posts: n/a
 
      05-20-2004


I have multiple list box added to the asp page using <select> tag

I have added items in the list box using recrdset from Education table
Education table={educationid, educationname}

User can choose more than items from the list box. These items gets
added in the user table in field
"edu" seprated by commas.
When User wants to edit his information ...i want that the items in the
list box should be automatically selected which are present in "edu"
field.
Please help
Amit shinde

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 
Reply With Quote
 
 
 
 
Dominique
Guest
Posts: n/a
 
      05-20-2004
dim strEdu
strEdu = field_value_in_db 'get it from ur recordset

function select_field(eID)
if instr(1, strEdu, eID) then
select_field = " selected"
end if
end function

call the function above when ur looping through the recordset to create the
list again...

do until rs.eof %>
<option value="<%=rs("educationid")%>"
<%=select_field(rs("educationid"))%>><%=rs("educat ionname")%></option>
<%
rs.movenext
loop

"Amit Shinde" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>
>
> I have multiple list box added to the asp page using <select> tag
>
> I have added items in the list box using recrdset from Education table
> Education table={educationid, educationname}
>
> User can choose more than items from the list box. These items gets
> added in the user table in field
> "edu" seprated by commas.
> When User wants to edit his information ...i want that the items in the
> list box should be automatically selected which are present in "edu"
> field.
> Please help
> Amit shinde
>
> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Windows : Retrive Quick Launch toolbar items Ak Newfish Ruby 4 03-24-2009 04:23 AM
How to retrive first 10 items from hash in ruby? Vikas Gholap Ruby 10 02-13-2009 04:37 PM
Is there any way to append some items to List box, without retrieving all items through AJAX? Anjan Bhowmik ASP .Net 1 02-14-2008 09:02 PM
retrive preselected value in second drop down list from the first drop down list weiwei ASP .Net 0 01-05-2007 07:29 PM
Retrive the values in the list Box Amit D.Shinde ASP General 0 05-20-2004 12:24 PM



Advertisments