Howto dynamic call of a method
-
Hello, I have a class with many static methods. Now I want call methods from this class during runtime. The name of the method and the parameter names/values are given by string. (Background: The methods contain code for filling comboboxes and I want to write an AJAX-Solution to fill different types of comboboxes initiated by user-click inside a web page) Now I'm in a state of confusion, if that's possible. NOTE: Must be work with Framework 1.1 !!! Can anybody help me, please ? Stephan
\\\\\\|/// \\\\ - - // ( @ @ )
+---------------oOOo-(_)-oOOo-----------------+
| Stephan Pilz stephan.pilz@stephan-pilz.de |
| www.stephan-pilz.de |
| ICQ#: 127823481 |
+-----------------------Oooo------------------+
oooO ( )
( ) ) /
\ ( (_/
\_) -
Hello, I have a class with many static methods. Now I want call methods from this class during runtime. The name of the method and the parameter names/values are given by string. (Background: The methods contain code for filling comboboxes and I want to write an AJAX-Solution to fill different types of comboboxes initiated by user-click inside a web page) Now I'm in a state of confusion, if that's possible. NOTE: Must be work with Framework 1.1 !!! Can anybody help me, please ? Stephan
\\\\\\|/// \\\\ - - // ( @ @ )
+---------------oOOo-(_)-oOOo-----------------+
| Stephan Pilz stephan.pilz@stephan-pilz.de |
| www.stephan-pilz.de |
| ICQ#: 127823481 |
+-----------------------Oooo------------------+
oooO ( )
( ) ) /
\ ( (_/
\_) -
So you want to run a method based on a string that is sent from the client? That's a pretty bad idea, as anyone can send any string to your server to run any method they like.
--- single minded; short sighted; long gone;
You are right, but not exactly :) Will make a self written AJAX-call with different parameters. Some parameters describes the call of the method. Please don't panic about the security. Is an internal website with different authorization mechanism. Stephan
\\\\\\|/// \\\\ - - // ( @ @ )
+---------------oOOo-(_)-oOOo-----------------+
| Stephan Pilz stephan.pilz@stephan-pilz.de |
| www.stephan-pilz.de |
| ICQ#: 127823481 |
+-----------------------Oooo------------------+
oooO ( )
( ) ) /
\ ( (_/
\_) -
Hello, I have a class with many static methods. Now I want call methods from this class during runtime. The name of the method and the parameter names/values are given by string. (Background: The methods contain code for filling comboboxes and I want to write an AJAX-Solution to fill different types of comboboxes initiated by user-click inside a web page) Now I'm in a state of confusion, if that's possible. NOTE: Must be work with Framework 1.1 !!! Can anybody help me, please ? Stephan
\\\\\\|/// \\\\ - - // ( @ @ )
+---------------oOOo-(_)-oOOo-----------------+
| Stephan Pilz stephan.pilz@stephan-pilz.de |
| www.stephan-pilz.de |
| ICQ#: 127823481 |
+-----------------------Oooo------------------+
oooO ( )
( ) ) /
\ ( (_/
\_)Try AssemblyContents and TypeContents to invke method from its name in string format
Salman Sheikh
-
Try AssemblyContents and TypeContents to invke method from its name in string format
Salman Sheikh
Thanks for the answer, but I can't find AssemblyContents or TypeContens (or so) in online help msdn. Did you have more informations about that? Objects, Namespace, use of it, ... = Stephan
\\\\\\|/// \\\\ - - // ( @ @ )
+---------------oOOo-(_)-oOOo-----------------+
| Stephan Pilz stephan.pilz@stephan-pilz.de |
| www.stephan-pilz.de |
| ICQ#: 127823481 |
+-----------------------Oooo------------------+
oooO ( )
( ) ) /
\ ( (_/
\_) -
Hello, I have a class with many static methods. Now I want call methods from this class during runtime. The name of the method and the parameter names/values are given by string. (Background: The methods contain code for filling comboboxes and I want to write an AJAX-Solution to fill different types of comboboxes initiated by user-click inside a web page) Now I'm in a state of confusion, if that's possible. NOTE: Must be work with Framework 1.1 !!! Can anybody help me, please ? Stephan
\\\\\\|/// \\\\ - - // ( @ @ )
+---------------oOOo-(_)-oOOo-----------------+
| Stephan Pilz stephan.pilz@stephan-pilz.de |
| www.stephan-pilz.de |
| ICQ#: 127823481 |
+-----------------------Oooo------------------+
oooO ( )
( ) ) /
\ ( (_/
\_)I am not sure if it would help you but this evaluator allows calls to methods within functions from a string source. http://www.codeproject.com/dotnet/eval3.asp[^]