• Advertisement
Sign in to follow this  

ASP.NET with VB. I need help

This topic is 1943 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

So my teacher gave us this awesome project where we have to data bind the information the user enters on a textbox and selects on a drop down list at the click of a button. He gave us this video which showed us how to get the database set up with the table easy peasy, then when it came to the button coding part, the guy in the video was using C# and I need to do it in VB -___-, I've been looking around and no one can give me a clear answer. So how do I make it so when I click the button it saves the info on a textbox to my table and a dropdownlist selection. If anyone can tell me I'd really appreciate it.

Share this post


Link to post
Share on other sites
Advertisement
When the onlick event happens insert the text field inside the textbox object into an SQL stringbuffer.
With the dropdown, using the nth selectedindex value look up the nth value inside the items collection.
Then insert that value into the SQL stringbuffer.

http://msdn.microsof...opdownlist.aspx
http://msdn.microsof...ox.textbox.aspx
http://forums.asp.net/t/1042463.aspx/1
http://www.yaldex.com/vb-net-tutorial-2/library.books24x7.com/book/id_5526/viewer.asp@bookid=5526&chunkid=0225724381.htm

For databinding you will need to update the SQL buffer for every onTextChange(The textbox), or onSelect(The dropdown).
This is automatic when you bind the control to the DB. Look at last couple links I included, they cover this. Edited by kd7tck

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement