How javascript function can call ASP.NET codebehind procedure?

Discussion in 'ASP .Net' started by JB, Sep 29, 2009.

  1. JB

    JB Guest

    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
     
    JB, Sep 29, 2009
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. rahulkate
    Replies:
    0
    Views:
    16,743
    rahulkate
    Feb 26, 2004
  2. Steven K
    Replies:
    3
    Views:
    8,320
    Maxim Kazitov
    Apr 14, 2004
  3. =?Utf-8?B?Um9iIFNob3JuZXk=?=

    How to call a codebehind method from clientside javascript

    =?Utf-8?B?Um9iIFNob3JuZXk=?=, Nov 3, 2004, in forum: ASP .Net
    Replies:
    6
    Views:
    85,613
    rakhy_rakey
    Nov 16, 2011
  4. Mike P
    Replies:
    0
    Views:
    3,335
    Mike P
    Jun 19, 2006
  5. Joe
    Replies:
    0
    Views:
    131
Loading...

Share This Page