By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,952 Members | 1,617 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,952 IT Pros & Developers. It's quick & easy.

populating text box based on drop down list

P: 48
Expand|Select|Wrap|Line Numbers
  1. Protected Sub ddlCarriers_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ddlCarriers.SelectedIndexChanged
  2.         ddlScacs.SelectedIndex = ddlCarriers.SelectedIndex
  3.  
  4.         ddlCarriers.SelectedItem.Value = "R & L Carriers"
  5.         tbProNumber.Text = "I"
  6.  
  7.  
  8.     End Sub
my current code is adding the "I" when i select any carrier.

I want it to only populate with "I" when i select "R & L carriers"

how would i do that?
Sep 23 '15 #1
Share this Question
Share on Google+
1 Reply


P: 48
Expand|Select|Wrap|Line Numbers
  1. Protected Sub ddlCarriers_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ddlCarriers.SelectedIndexChanged
  2.         ddlScacs.SelectedIndex = ddlCarriers.SelectedIndex
  3.  
  4.         If ddlCarriers.SelectedItem.Value = "r & l carriers" Then
  5.             tbProNumber.Text = "I"
  6.         Else
  7.             Return
  8.         End If
  9.  
  10.  
  11.  
  12.  
  13.     End Sub
i have also tried this, but it does nothing.
Sep 23 '15 #2

Post your reply

Sign in to post your reply or Sign up for a free account.