Link to home
Create AccountLog in
Avatar of ASPDEV
ASPDEV

asked on

AJAX Callback in ASP.NET

Hello Experts,

I have a Dropdownlist, where I get the value of the selected one's and pass it through a callback server Pagemethod  which is STATIC, but I need to bind a Datagrid based on the value which I cannot do because of Static method.

I need to call a NON-Static method instead, how can I do this?
Avatar of Jared_S
Jared_S

You'll need to create an instance of the class and invoke the method on it.

public class Foo
{
    public void Data1()
    {
    }

    public static void Data2()
    {
         Foo foo = new Foo();
         foo.Data1();
    }
}
ASKER CERTIFIED SOLUTION
Avatar of Rajar Ahmed
Rajar Ahmed
Flag of India image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
Avatar of ASPDEV

ASKER

Thanks.