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. Web Development
  3. ASP.NET
  4. call asp.net members from html page

call asp.net members from html page

Scheduled Pinned Locked Moved ASP.NET
questioncsharphtmlasp-net
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
    Shimmy Weitzhandler
    wrote on last edited by
    #1

    let's say I have a page page.aspx, it includes a class named SampleClass and a method name myMethod. I want to call this method from a HTML page. how do I do this?

    Shimi

    M N 2 Replies Last reply
    0
    • S Shimmy Weitzhandler

      let's say I have a page page.aspx, it includes a class named SampleClass and a method name myMethod. I want to call this method from a HTML page. how do I do this?

      Shimi

      M Offline
      M Offline
      MrPlankton
      wrote on last edited by
      #2

      There are 2 ways of doing this in my experience; 1. Set a flag, say a hidden text field with some indicator of what method you want to call on the server. Then do a self submit in javascript and look for flag on Page_load event. If you see the flag call the method. 2. Use ajax

      MrPlankton

      S 1 Reply Last reply
      0
      • M MrPlankton

        There are 2 ways of doing this in my experience; 1. Set a flag, say a hidden text field with some indicator of what method you want to call on the server. Then do a self submit in javascript and look for flag on Page_load event. If you see the flag call the method. 2. Use ajax

        MrPlankton

        S Offline
        S Offline
        Shimmy Weitzhandler
        wrote on last edited by
        #3

        I don't know to perform both of your suggestions

        Shimi

        T 1 Reply Last reply
        0
        • S Shimmy Weitzhandler

          let's say I have a page page.aspx, it includes a class named SampleClass and a method name myMethod. I want to call this method from a HTML page. how do I do this?

          Shimi

          N Offline
          N Offline
          Not Active
          wrote on last edited by
          #4

          If it's asp.net (page.aspx would indicate this) you just need an event, say a button click to generate the postback, from which you can call the method you want. Or, script callbacks, http://www.developer.com/net/asp/article.php/3485991[^]


          only two letters away from being an asset

          S 1 Reply Last reply
          0
          • S Shimmy Weitzhandler

            I don't know to perform both of your suggestions

            Shimi

            T Offline
            T Offline
            Tad McClellan
            wrote on last edited by
            #5

            I have an article which is basically a control for implementing ajax (which is what your talking about). These days though you should just look into asp.net ajax. www.asp.net

            TadMcClellan.Com

            1 Reply Last reply
            0
            • N Not Active

              If it's asp.net (page.aspx would indicate this) you just need an event, say a button click to generate the postback, from which you can call the method you want. Or, script callbacks, http://www.developer.com/net/asp/article.php/3485991[^]


              only two letters away from being an asset

              S Offline
              S Offline
              Shimmy Weitzhandler
              wrote on last edited by
              #6

              could you explain to me how to this please? I mean, what I'm trying to do is to use a method \ function from VB\C#.NET compiled class in the App_Code folder from a simple html page at the OnClick etc. event that has been raised via a HTML and other pure client controls\events.

              Shimi

              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