raising an event for a particular dropdownlist when multiple dropdownlists are being added to a webform dynamically.
-
Since I seemed to have stumped the experts on here as to how to go about creating a "chain" of dropdownlists, I was hoping someone could help me with a smaller issue. How would I go about :confused:raising an event for a particular dropdownlist when multiple dropdownlists are being added to a webform dynamically.:confused: I would like to identify the event using Ajax.
-
Since I seemed to have stumped the experts on here as to how to go about creating a "chain" of dropdownlists, I was hoping someone could help me with a smaller issue. How would I go about :confused:raising an event for a particular dropdownlist when multiple dropdownlists are being added to a webform dynamically.:confused: I would like to identify the event using Ajax.
If you're using AJAX, it's trivial. Write your javascript code to pass through an Id which comes from each drop list, so, for example, when you create each one dynamically, it's selection changed event will call javascript which makes the AJAX call, stuff a variable in there to identify the drop down list in question. What do you mean by 'chain' ??? Of course, these dynamic controls will not have viewstate unless you handle them right, but if it's all AJAX, it's all client side, which is simpler.
Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
-
If you're using AJAX, it's trivial. Write your javascript code to pass through an Id which comes from each drop list, so, for example, when you create each one dynamically, it's selection changed event will call javascript which makes the AJAX call, stuff a variable in there to identify the drop down list in question. What do you mean by 'chain' ??? Of course, these dynamic controls will not have viewstate unless you handle them right, but if it's all AJAX, it's all client side, which is simpler.
Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
-
I answered this, not sure what else to say.
Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )