Moving a string from client to server (JS -> ASPX)

K

K Viltersten

In the client.js file i declare the
following variable.

...
var str = "info";
...

In the corresponding ASP file called
server.aspx.cs i declare two following
methods.

...
protected void Page_Load (
object sender, EventArgs e){...}
public void SomeThing () {
...
String data;
...}
...

The objective is to _SOMEHOW_ ensure
that the value of data (in the CS file)
is obtained from str (in the JS file).

Note that i don't need data to be
dynamically updated as soon as str is
changed. It's sufficient to call the
method SomeThing each time we pass the
part of code where we assign the value
"info" to str.

Note also that i need to notify
SomeThing about the value of str.

Of course, the actual situation is far
more complicated but my problem can be
boiled down to this simple case.

How should SomeThing be designed? How
need i to reconstruct the lines after
the assignment to str?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,792
Messages
2,569,639
Members
45,351
Latest member
RoxiePulli

Latest Threads

Top