0

I have a textbox named textbox1 and a dropdownlist. Dropdownlist contains the list of branches and i want that when i select a branch from dropdown i want to get the respective branch code to be generated in a textbox from the Database or from c# coding. How will it be possible ?

2 Answers2

1

Am I missing something, is it more complex that just putting an event handler on the dropdown so that when it's value changes it calls your method that can do whatever it needs to do to generate the string for the textbox?

John3136
  • 28,809
  • 4
  • 51
  • 69
0

Skipping passed the "database" portion of your question (and assuming your data isn't bound to the DropDownList)..

One way in ASP.NET, to accomplish this, I believe, is to have your code print DropDownList.SelectedValue's value in the textbox during an event.

Here is a link showing how to bind an event to DropDownList in jQuery

Community
  • 1
  • 1
Spencer
  • 375
  • 1
  • 5
  • 17