Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. Howto dynamic call of a method

Howto dynamic call of a method

Scheduled Pinned Locked Moved Visual Basic
helpquestion
6 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Stephan Pilz
    wrote on last edited by
    #1

    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 ( )
    ( ) ) /
    \ ( (_/
    \_)

    G S P 3 Replies Last reply
    0
    • S Stephan Pilz

      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 ( )
      ( ) ) /
      \ ( (_/
      \_)

      G Offline
      G Offline
      Guffa
      wrote on last edited by
      #2

      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;

      S 1 Reply Last reply
      0
      • G Guffa

        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;

        S Offline
        S Offline
        Stephan Pilz
        wrote on last edited by
        #3

        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 ( )
        ( ) ) /
        \ ( (_/
        \_)

        1 Reply Last reply
        0
        • S Stephan Pilz

          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 ( )
          ( ) ) /
          \ ( (_/
          \_)

          S Offline
          S Offline
          Salman Sheikh
          wrote on last edited by
          #4

          Try AssemblyContents and TypeContents to invke method from its name in string format

          Salman Sheikh

          S 1 Reply Last reply
          0
          • S Salman Sheikh

            Try AssemblyContents and TypeContents to invke method from its name in string format

            Salman Sheikh

            S Offline
            S Offline
            Stephan Pilz
            wrote on last edited by
            #5

            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 ( )
            ( ) ) /
            \ ( (_/
            \_)

            1 Reply Last reply
            0
            • S Stephan Pilz

              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 ( )
              ( ) ) /
              \ ( (_/
              \_)

              P Offline
              P Offline
              Pascal Ganaye
              wrote on last edited by
              #6

              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[^]

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups