Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > Multiple Selections

Reply
Thread Tools

Multiple Selections

 
 
jjuan
Guest
Posts: n/a
 
      02-08-2007
I have a multiple dropdown which have multiple selection.

If I select multiple value on my multiple dropdown list and submit it,how
can i write it on the tblotherlang

sample code

<select size="10" name="ddmultiplelang" multiple>
<%

qryNCDesc = "SELECT MultiLanguageID, MultiLanguageDesc FROM tbllang"

Set rstNCDesc = Server.CreateObject("ADODB.Recordset")
rstNCDesc.open qryNCDesc, cndpr
%>
<%
Do While NOT rstNCDesc.EOF
%>
<option
value="<%=rstNCDesc.Fields("MultiLanguageID").Valu e%>"><%=rstNCDesc.Fields("MultiLanguageDesc").Valu e%></option>
<%
rstNCDesc.MoveNext
Loop
%>




I have this three table:

tbllang

MultiLanguageID LanguageDesc
1 Filipino
2 English
3 Japanese


tblmain

NameID name language MultiLanguage
1 Joan Filipino a
2 Katrina English
3 Kristine Japanese a


tblotherlang

OtherLangID OthernameID othermultilaguange
1 1 2
2 1 3
3 3 1




How can i insert the value on tblotherlang.othernameID and
tblotherlang.othermultilanguage?

Please help!

THANKS


 
Reply With Quote
 
 
 
 
Mark J. McGinty
Guest
Posts: n/a
 
      02-08-2007

"jjuan" <> wrote in message
news:%...
>I have a multiple dropdown which have multiple selection.
>
> If I select multiple value on my multiple dropdown list and submit it,how
> can i write it on the tblotherlang
>
> sample code
>
> <select size="10" name="ddmultiplelang" multiple>
> <%
>
> qryNCDesc = "SELECT MultiLanguageID, MultiLanguageDesc FROM tbllang"
>
> Set rstNCDesc = Server.CreateObject("ADODB.Recordset")
> rstNCDesc.open qryNCDesc, cndpr
> %>
> <%
> Do While NOT rstNCDesc.EOF
> %>
> <option
> value="<%=rstNCDesc.Fields("MultiLanguageID").Valu e%>"><%=rstNCDesc.Fields("MultiLanguageDesc").Valu e%></option>
> <%
> rstNCDesc.MoveNext
> Loop
> %>
>
>
>
>
> I have this three table:
>
> tbllang
>
> MultiLanguageID LanguageDesc
> 1 Filipino
> 2 English
> 3 Japanese
>
>
> tblmain
>
> NameID name language MultiLanguage
> 1 Joan Filipino a
> 2 Katrina English
> 3 Kristine Japanese a
>
>
> tblotherlang
>
> OtherLangID OthernameID othermultilaguange
> 1 1 2
> 2 1 3
> 3 3 1
>
>
>
>
> How can i insert the value on tblotherlang.othernameID and
> tblotherlang.othermultilanguage?


Assuming that ddmultiplelang is contained in a form, the ASP script that
form posts to will receive the user selection as an array:

<html><body><form method=post action=#>
<select name=ddmultiplelang size=10 multiple>
<option value=1>English</option>
<option value=2>Filipino</option>
<option value=3>French</option>
<option value=4>German</option>
<option value=5>Japanese</option>
<option value=6>Russian</option>
<option value=7>Spanish</option>
</select><input type=submit /></form>
<%
For i = 1 to Request.Form("ddmultiplelang").count
Response.Write Request.Form("ddmultiplelang")(i) & "<br>"
Next
%>
</body></html>



So, assuming you also provide the posted-to ASP with the id of the current
user, you'd need to insert a row for each element in the array.


-Mark



> Please help!
>
> THANKS
>
>



 
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
asp:ListBox multiple selections Chris Kettenbach ASP .Net 5 10-07-2005 08:01 PM
Multiple selections in dropdownlist Steffen Loringer ASP .Net 2 08-11-2005 09:55 AM
Bind multiple selections to a query John Hoge ASP .Net 2 11-30-2004 10:12 PM
Obtaining Data Based Upon Multiple Selections From a ListBox... =?Utf-8?B?QWRpcw==?= ASP .Net 0 10-19-2004 01:29 PM
multiple listbox selections bill yeager ASP .Net 0 08-12-2003 08:38 PM



Advertisments