call asp.net members from html page
-
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
-
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
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
-
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
I don't know to perform both of your suggestions
Shimi
-
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
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
-
I don't know to perform both of your suggestions
Shimi
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
-
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
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