How javascript function can call ASP.NET codebehind procedure?

J

JB

Hello

I have a c# ASP.NET web application that uses Javascript and
codebehind. There is a CheckBox on my web page that the onclick event
onclick="DisplayInfo()" executes a javascript function named DisplayInfo()
that looks like this:

function DisplayInfo()
{

}

The Javascript function DisplayInfo first does some things and when it
finishes it needs to call a procedure in the codebehind of the C# ASP.NET
application that looks like this:

public void ReadRows()
{
strsql.connection = new sqlconnection();
strsql.command.text = "select * from dSource";
strAdapter.selectcomman=strsql;
strAdapter.fill(ds, "tblname");

}

Can Anyone tell me how I can call the above public void ReadRows()
procedure in my ASP.NET codebehind page from the above javascript function
named DisplayInfo()?

JB
 

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,754
Messages
2,569,527
Members
44,998
Latest member
MarissaEub

Latest Threads

Top