Solved

AJAX Callback in ASP.NET

Posted on 2013-01-07
3
293 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…

920 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now