Solved

AJAX Callback in ASP.NET

Posted on 2013-01-07
3
292 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
Comment Utility
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
Comment Utility
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
Comment Utility
Thanks.
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

763 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

11 Experts available now in Live!

Get 1:1 Help Now