i have this web service and a web form. what happens in the application is my web service returns a dataset and im binding that data set in to a data grid every thing is working when im using it with a win form but with the web form its not working please help me to solve this.

when i execute this ds is not getting populated but this works in a win form

also in web form when im not using AsyncCallback it works fine,

in the form load im getting the return and binding it to the datagrid

private void Page_Load(object sender, System.EventArgs e)
    {                                   

selectedbooks=(string[])Session["selbooks"];
AsyncCallback cb = new AsyncCallback(gbdCallback);
IAsyncResult ar=webS.BeginGetBookData(selectedbooks,Convert.ToInt32(Session["addcount"]),cb,webS);



                        this.dgresults.Visible=true;

                        this.dgresults.DataSource=dsSort;
                        this.dgresults.DataBind();


                    totalcal();
                }

.

public void gbdCallback(IAsyncResult ar)
    {

        ds= (DataSet)webS.EndGetBookData(ar);           
        dsSort=ds;


    }
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.