?
Solved

AJAX Callback in ASP.NET

Posted on 2013-01-07
3
Medium Priority
?
305 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 1500 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

Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

Question has a verified solution.

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

I found this questions asking how to do this in many different forums, so I will describe here how to implement a solution using PHP and AJAX. The logical flow for the problem should be: Write an event handler for the first drop down box to get …
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…

718 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