Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

asp:dropdownlist 1

Status
Not open for further replies.

dhmfh

Programmer
Nov 28, 2005
69
GB
Hi guys

I have the following code

Protected Sub SelVirtualTour_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles SelVirtualTour.Load

'This Will DataBind The Dates Drop Down Control
If Not Me.Page.IsPostBack Then

SelVirtualTour.DataSource = PropertyVirtualTourContent.PropertyVirtualTour
SelVirtualTour.AutoPostBack = True
SelVirtualTour.DataValueField = "VirtualTour_Id"
SelVirtualTour.DataTextField = "VirtualTour_Name"
SelVirtualTour.DataBind()

End If

End Sub

How do I return the value of the item selected into a querystring eg( vid=value)

Kind regards

 
Code:
Response.Redirect("mypage.aspx?vid=" & SelVirtualTour.SelectedItem.Value)


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
ok thanks for that ca8msm, the issue I have now that is when I call this page for the first time it runs the the response.redirect. What I want it to do is load the page and then when I select an option it does the redirect
 
Just call the above code on the SelectedIndexChanged event of the DropDownList


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top