Hi all,

I have this code in my page_load event of my user control.

Code:
 If Not IsPostBack() Then
            LoadLocations(lstLocation)
            lstLocation.Attributes.Add("onchange", "javascript: document.Form1.submit()")
          
            Select Case strDisplayMode.ToUpper
                Case "RESULTS"
                    poPurchaseOrders.Find(strRequestedBy, strRaisedBy, strApprovedBy, strMatterNumber, strPurchaseOrderNumber, strOffice, intPageNumber, intRecordsOnPage)
                Case "MYLIST"
                    poPurchaseOrders.Find(Session("EmployeeName"), "", "", "", "", "", intPageNumber, intRecordsOnPage)
                Case Else
                    poPurchaseOrders.Find("", "", "", "", "", "", intPageNumber, intRecordsOnPage)
                 End Select
        Else
            poPurchaseOrders.Find("", "", "", "", "", lstLocation.SelectedValue, intPageNumber, intRecordsOnPage)
        End If

        DataGrid1.DataSource = poPurchaseOrders.Results
        DataGrid1.RecordCount = poPurchaseOrders.RecordCount
        DataGrid1.RecordsOnPage = intRecordsOnPage
        DataGrid1.CurrentPage = intPageNumber
        DataGrid1.QueryString = GetQueryString()
End If
The problem is after every postback, the value of the selectedvalue of the dropdownlistbox is not the current value but the previous value. So to illustrate, suppose the value of the dropdownlistbox are '1','2','3','4'.

If the user selects '2', it gets the selected initially which is '1'.....
then the user selects '3', it gets '2',
user selects '4', it gets '3',
user selects '1', it gets '4'

I might be missing something here.

Kindly help.

Thanks in advance.