AspdotnetCodes.com
Search
Articles
Books
Resources
Asp.Net News
Downloads
Free Tech Magazines
Asp.Net Web Hosting
Archives
Softwares
Newsletter
Suggest Us
Link to Us
Feeds Subscription
Articles
Questions & Answers
Tips & Tricks
 inserting dropdownlist value into database
Posted by anusha on  5/6/2009 12:30:09 PM Category: Asp.Net 2.0
Add to my favorites
Email to friend
hi,
i'm using asp.net with vb language...
i need to insert the dropdownlist value into the database..
in my designed form i have two textboxes and 1 dropdownlist control
i have used the followong code to insert the data into database through textbox..

con as new sqlconnection(......)
s1 as string
cmd as sqlcommand
s1=insert into feedback(table name)(name,email)values(@name,@email)
cmd.parameters.add("name",...)
:
textbox1.text=" "
could u help me out... pls

Post Your Reply Post New Question

 Viewer's Reply
Use SelectedValue
Answered By Moderator1 on 5/9/2009 10:17:47 AM
You can get the value of the dropdownlist with the following code.

DropDownList1.SelectedValue

Or

DropDownList1.SelectedItem.Text
 
Post Your Reply If you still have problem, post it again under this reply for better response.

 
Sponsored by
Oracle Magazine
Many .NET teams are underperforming, is yours?
FierceDeveloper