Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > How javascript function can call ASP.NET codebehind procedure?

Reply
Thread Tools

How javascript function can call ASP.NET codebehind procedure?

 
 
JB
Guest
Posts: n/a
 
      09-29-2009
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
--
JB
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
How to call a codebehind method from clientside javascript =?Utf-8?B?Um9iIFNob3JuZXk=?= ASP .Net 6 11-16-2011 09:57 PM
write a function such that when ever i call this function in some other function .it should give me tha data type and value of calling function parameter komal C++ 6 01-25-2005 11:13 AM
Call function in codebehind from jscript in aspx page moondaddy ASP .Net 2 02-27-2004 05:35 PM
Can not call codebehind function for inherited dropdownlist Joe ASP .Net Web Controls 0 11-17-2003 11:56 PM



Advertisments