| | |
How Do I Get Value Selected From ComboBox?
Please support our VB.NET advertiser: Intel Parallel Studio Home
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
| Thread Tools | Search this Thread |
.net .net2008 2008 access advanced application array basic beginner browser button buttons center checkbox click client code combo convert cuesent data database datagrid datagridview date datetimepicker designer dissertation dissertations dissertationtopic eclipse excel exists fade filter forms function generatetags html images input intel internet listview map mobile module monitor msaccess net number objects open panel pdf picturebox picturebox2 port position print printing read regex remove right-to-left save search searchvb.net serial settings shutdown socket sorting sqldatbase sqlserver survey temperature textbox timer timespan transparency txttoxmlconverter user usercontol validation vb vb.net vba vbnet visual visualbasic visualbasic.net visualstudio.net web winforms winsock wpf wrapingcode xml year





