Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB.NET 1.0 > Pro VB.NET 2002/2003
Pro VB.NET 2002/2003 For advanced Visual Basic coders working .NET version 2002/2003. Beginning-level questions will be redirected to other forums, including Beginning VB.NET.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro VB.NET 2002/2003 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old January 12th, 2005, 10:44 AM
Registered User
Join Date: Dec 2004
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Retrive values to Drop down list from DB when Back

Hi guys,
On a form i have dropdown lists, when selected and the continue button is pressed the values from dropdown are inserted on to the database. On the next web page i have a back button, if pressed it goes to the previous page (Form 1) with requesting the id that was submitted from the DB.
I now also want to retrive what was selected on the dropdown list to show up when the back button is pressed. So if Yes was selected and passed, the DB will insert the value true. When i press the back button that Yes will need to load on theat drop down list.

Can someone help me on how i could do this.

The continue button:
Response.Redirect("showtable.aspx?tid=" & tmid & "&pc=" & strPostCode)

The Back Button:
Private Sub btnback_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnback.Click
Response.Redirect("TelephoneUsage.aspx?tid=" & TM.TelephoneInputFormID & "&pc=" & strPostCode)
End Sub

these are getting inserted into the database:
With Signup
.TelephoneCallPlanID = numberofcalls.SelectedItem.Value
.TelephoneUsageTimeID = whencallsaremade.SelectedItem.Value
.TelephoneUsageLocationID = wherecallsaremade.SelectedItem.Value
.SpecificMobileNetworks = callstomobile.SelectedItem.Value
.TelephoneCallsPerDayID = numberofcalls.SelectedItem.Value
.InternationalCalls = callstointernational.SelectedItem.Value

End With

when the back button is pressed these needs to be retrived back on the drop down list.


Similar Threads
Thread Thread Starter Forum Replies Last Post
Create a drop down list using database values erinrox JSP Basics 1 September 4th, 2007 06:59 AM
Drop down list text value not posting back with co binici ASP.NET 2.0 Basics 0 December 12th, 2006 08:38 PM
drop down list values based on another drop down noor ASP.NET 1.0 and 1.1 Basics 3 July 5th, 2005 09:57 AM
Post Back Required For Drop Down List alyeng2000 ASP.NET 1.0 and 1.1 Professional 4 March 14th, 2005 01:15 PM
Create drop down list from SQL DB lshamba Classic ASP Databases 2 August 26th, 2004 10:49 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.