0

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;


    }

Edited by Nick Evan: Fixed formatting

2
Contributors
1
Reply
3
Views
6 Years
Discussion Span
Last Post by Rogachev
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.