Topic:   Populate ASP.Net TextBox with value from DropDownList using javascript
Oct 10, 2020 10:35 1 Replies 861 Views HIMANSHU

I am trying to populate a TextBox within an ASPX page (C#) with a dropdownlist value using JQuery. I tested the code and it works very well outside of an ASP.Net FormView control. It populates the textbox as advertised. But, as some of you know, you have to do something different to make it work when the DropDownList control and TextBox control are embedded inside the FormView control. The solution I need is how to use FindControl to make this work. Or, provide the syntax to make this work inside the FormView. My JavaScript is horrible at best! I gave this a try but it was wrong! Again, I am not professing to be an expert. I don't want to change the javascript that is working! I just want it to work with the FormView.


Prev Next
Topic Replies (1)
  1. 1
    idnkx user


    Below is the line of code to locate the DDL for which you need the ClientID using FindControl -


Leave a Reply
Guest User

Not sure what course is right for you?

Choose the right course for you.
Get the help of our experts and find a course that best suits your needs.

Let`s Connect