I have the following code. When I select from the drop down and click sumbit i need the drop down to hold the value I selected when I go to another page. What am I missing from the below?
Protected Sub SelLocations_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles SelLocations.Load
'This Will DataBind The Dates Drop Down Control
If Not Me.Page.IsPostBack Then
SelLocations.DataSource = Search.Locations
SelLocations.AutoPostBack = False
SelLocations.DataValueField = "Location_Id"
SelLocations.DataTextField = "Location_Name"
SelLocations.DataBind()
Else
SelLocations.SelectedValue = Me.Session("Locations")
End If
End Sub
Protected Sub SelLocations_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles SelLocations.Load
'This Will DataBind The Dates Drop Down Control
If Not Me.Page.IsPostBack Then
SelLocations.DataSource = Search.Locations
SelLocations.AutoPostBack = False
SelLocations.DataValueField = "Location_Id"
SelLocations.DataTextField = "Location_Name"
SelLocations.DataBind()
Else
SelLocations.SelectedValue = Me.Session("Locations")
End If
End Sub