how to call server-side methods from client side

D

Dinçer

I have three TextBoxes. Say, txtValue1, txtValue2 and txtValue3...

After the user enters something into the txtValue1 and tabs; I want to go to
the serverside, call a method(which will take txtValue1's value as argument)
and fill in the values of txtValue2 and txtValue3.

To do this, I need to implement javascripts "onBlur" event handler so that
it calls my method (say CalculateValues()) on the serverside.

What should I do to call a serverside method from my client side javascript?
 
B

Bopoo

I have three TextBoxes. Say, txtValue1, txtValue2 and txtValue3...

After the user enters something into the txtValue1 and tabs; I want to go to
the serverside, call a method(which will take txtValue1's value as argument)
and fill in the values of txtValue2 and txtValue3.

To do this, I need to implement javascripts "onBlur" event handler so that
it calls my method (say CalculateValues()) on the serverside.

What should I do to call a serverside method from my client side javascript?

No need to do this in javascript. All happens in server.

in PageLoad

if (Page.IsPostBack)
{
txValue2.Text = txtValue1.Text;
txValue3.Text = txtValue2.Text;
}
 

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,755
Messages
2,569,537
Members
45,021
Latest member
AkilahJaim

Latest Threads

Top