Solved

AJAX Callback in ASP.NET

Posted on 2013-01-07
3
296 Views
Last Modified: 2013-01-07
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?
0
Comment
Question by:ASPDEV
3 Comments
 
LVL 12

Expert Comment

by:Jared_S
ID: 38751445
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();
    }
}
0
 
LVL 18

Accepted Solution

by:
Rajar Ahmed earned 500 total points
ID: 38751735
No not possible , you cannot bind datagrid inside web method .

Other possible solution,
By sending data to client side and binding over there,
http://weblogs.asp.net/ahmedmoosa/archive/2010/10/30/bind-gridview-using-jquery.aspx
http://forums.asp.net/t/1774937.aspx/1


or else simply use updatepanel .
0
 

Author Closing Comment

by:ASPDEV
ID: 38752547
Thanks.
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
The Confluence of Individual Knowledge and the Collective Intelligence At this writing (summer 2013) the term API (http://dictionary.reference.com/browse/API?s=t) has made its way into the popular lexicon of the English language.  A few years ago, …
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

825 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question