views:

19

answers:

1

I want to access my gridview in the static method?

I am doing async call from javascript,

I need code for this,

Please help me

 [System.Web.Services.WebMethod()]
    public static void bindGrid(string userinfoId, int row)
    {
 GridView gv;
        gv = (GridView)gvParent.Rows[row - 1].FindControl("gvChild");
        gv.DataSource = GetProfileData(userinfoId);
        gv.DataBind();        
    }

i want to access grid view,gridview is not static.

I want to know, Is their any possiblity for using gridview in static method.? Yes or No.

A: 

You can put it in session or in cache.

Alex Reitbort
i can not understand it,what should i put in session
Ramakrishnan