I have a web page where I am trying to populate the PSI # into the txtPSI depending on which customer is selected in ddlCustomers. I have written it a way it has worked on a past project and it compiles with no errors, however it doesn't work when it runs.

Protected Sub ddlCustomers_SelectedIndexChanged(ByVal sender As Object, ByVal e As EventArgs) Handles ddlCustomers.SelectedIndexChanged  
  'Populate PSI # in txtPSI based on Customer selected  
  Dim PSINumber As String = ""
  If ddlCustomers.SelectedIndex > 0 Then
    PSINumber = OMCustomerPSI.GetPSI(ddlCustomers.SelectedItem.ToString)  
    If PSINumber = "" Then
    MessageBox.Show("There is no PSI Number available. (Please create new PSI Number in Digecenter Manage Site.)")  
    Else
    txtPSI.Text = PSINumber  
    End If
  End If
  End Sub

If anyone can help me get this working properly I would greatly appreciate it, my whole project needs to be done EOD tomorrow. I still have a lot more to go. :( HELP!

Thanks.

Recommended Answers

All 3 Replies

Forgot to put AutoPostBack as true

can you tell us in brif abt your question and what is OMCustomerPSI.GetPSI

That happens to me with the ComboBox.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.