Jump to content

  • Log In with Google      Sign In   
  • Create Account

FREE SOFTWARE GIVEAWAY

We have 4 x Pro Licences (valued at $59 each) for 2d modular animation software Spriter to give away in this Thursday's GDNet Direct email newsletter.


Read more in this forum topic or make sure you're signed up (from the right-hand sidebar on the homepage) and read Thursday's newsletter to get in the running!


ASP.NET with VB. I need help


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
2 replies to this topic

#1 Rebel Coder   Members   -  Reputation: 158

Like
0Likes
Like

Posted 26 September 2012 - 06:17 PM

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.

Sponsor:

#2 kd7tck   Members   -  Reputation: 719

Like
-1Likes
Like

Posted 26 September 2012 - 08:52 PM

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, 26 September 2012 - 09:03 PM.


#3 Rebel Coder   Members   -  Reputation: 158

Like
0Likes
Like

Posted 27 September 2012 - 02:13 PM

Thanks alot :D




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS