| | |
How Do I Get Value Selected From ComboBox?
Please support our VB.NET advertiser: Programming Forums - DaniWeb Sister Site
Thread Solved |
Hi,
x=combobox.text
Loren Soth
x=combobox.text
Loren Soth
Best regards,
Loren Soth
Crimson K. Software _________________________________________________________________ Crimson K. Blog
Loren Soth
Crimson K. Software _________________________________________________________________ Crimson K. Blog
Hi,
PHP is a server side web scripting language where you don't have direct access to client side web controls like text and combo boxes. What you should do is to put <input> tags in a <form action="POST"> tag with destination to another (to the same is also possible, slightly more complicated) PHP page where contents of the selected combobox item will be returned to the new PHP page as $_POST["nameofpostvar"] variable when submitted. On server side scripting each action requires a round trip to the server.
Loren Soth
PHP is a server side web scripting language where you don't have direct access to client side web controls like text and combo boxes. What you should do is to put <input> tags in a <form action="POST"> tag with destination to another (to the same is also possible, slightly more complicated) PHP page where contents of the selected combobox item will be returned to the new PHP page as $_POST["nameofpostvar"] variable when submitted. On server side scripting each action requires a round trip to the server.
Loren Soth
Best regards,
Loren Soth
Crimson K. Software _________________________________________________________________ Crimson K. Blog
Loren Soth
Crimson K. Software _________________________________________________________________ Crimson K. Blog
•
•
Join Date: Jul 2007
Posts: 2
Reputation:
Solved Threads: 1
•
•
•
•
Salam...
I need to get value that has been selected from combobox ..
the values in combobox is taken from column's contents of one of tabel in database..so once i write if x=combobox.selectedvalue..i got error that i Additional information: Operator is not valid for type 'DataRowView' and string
I just wanted to know how do you go about this site...i mean...if i wanted to post a Q about JAVA etc...you see its an informative site but its tough moving in here...how do i do it???? if you can help me out...really appreciate it!!! thank you!!!
•
•
Join Date: Sep 2008
Posts: 1
Reputation:
Solved Threads: 1
In VB, the combobox's value can be retrieved several ways. x=combobox.selectedvalue will return a row like the error says. What intellisense doesn't tell you is that you can retrieve the information from this row using .Item(0) so x=combobox.selectedvalue.item(0) will give you the value including the type like integer, etc.
![]() |
Similar Threads
- ComboBox Events (VB.NET)
- combobox control (VB.NET)
- return a value from javascript (PHP)
- eliminate duplicate items in combobox! pls help! (Visual Basic 4 / 5 / 6)
- Issue related to combobox.... (VB.NET)
Other Threads in the VB.NET Forum
- Previous Thread: inheritance in vb
- Next Thread: updating database record using forms
Views: 54721 | Replies: 8
| Thread Tools | Search this Thread |
Tag cloud for VB.NET
"crystal .net 2008 access add advanced application array assignment basic beginner box button buttons center class click code combo convert cpu data database datagrid datagridview design designer dissertation dissertations dosconsolevb.net editvb.net employees excel exists firewall forms function images isnumericfuntioncall listview map math memory mobile module msaccess mssqlbackend mysql navigate net number opacity page pan picturebox picturebox2 port print printing printpreview problem record refresh regex reuse richtextbox right-to-left save search serial socket sorting sqldatbase sqlserver storedprocedure structures studio temp textbox timer txttoxmlconverter upload useraccounts usercontol vb vb.net vb.nettoolboxvisualbasic2008sidebar vb2008 vba vbnet vista visual visualbasic visualbasic.net visualstudio.net visualstudio2008 web winsock wpf xml





