Finding Control
-
Hi, My page contains several radiobutton controls and i want it to write checked radio button's id on the page.but how can we find checked radio button control by looping not using if or switch conditions or something. i gotta handle it with looping. Thanks and Regards...
-
Hi, My page contains several radiobutton controls and i want it to write checked radio button's id on the page.but how can we find checked radio button control by looping not using if or switch conditions or something. i gotta handle it with looping. Thanks and Regards...
I hope some body help me as possible as :)
-
Hi, My page contains several radiobutton controls and i want it to write checked radio button's id on the page.but how can we find checked radio button control by looping not using if or switch conditions or something. i gotta handle it with looping. Thanks and Regards...
atarikg wrote:
i gotta handle it with looping.
You can't do that. There is no collection of selected radio buttons that you can loop through. There isn't even a collection of radio buttons. There is a collection of form elements, you have to loop through that to find the radio buttons, then check each one of them to see if it is selected.
--- single minded; short sighted; long gone;
-
Hi, My page contains several radiobutton controls and i want it to write checked radio button's id on the page.but how can we find checked radio button control by looping not using if or switch conditions or something. i gotta handle it with looping. Thanks and Regards...
atarikg wrote:
i gotta handle it with looping.
No, you don't. There's actually a findcontrol method, or you can use recursion to find the controls that have the right names, or even to find all radio buttons, if you want to find all the radio buttons that may be checked, or if there can only be one.
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 )
-
atarikg wrote:
i gotta handle it with looping.
No, you don't. There's actually a findcontrol method, or you can use recursion to find the controls that have the right names, or even to find all radio buttons, if you want to find all the radio buttons that may be checked, or if there can only be one.
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 )
So there are any sample codes ? I wish you had given some sample codes or articles' adresses..:(
-
So there are any sample codes ? I wish you had given some sample codes or articles' adresses..:(
http://weblogs.asp.net/eporter/archive/2007/02/24/asp-net-findcontrol-recursive-with-generics.aspx[^]
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 )