I am having trouble binding data to data repeater when I use ISyncResult. This is what I am doing. There is a button inside a Update Panel that gets the input from the user and calls a function that returns a dataset that I then bind to data repeater which is also inside a update panel. What I did is that I made a delegate to this function, now I am calling this function like this
Dim caller As New AsyncMyFunction(AddressOf MyFunction)
And then I make a IASyncResult like this :
Dim result As IAsyncResult = caller.BeginInvoke(argument1, argument1, AddressOf MyFunctionCallBack, Nothing)
this is the Callback method:
Sub MyFunctionCallBack(ByVal ar As IAsyncResult)
Dim result As AsyncResult = CType(ar, AsyncResult)
Dim caller As AsyncMyFunction = CType(result.AsyncDelegate, AsyncMyFunction)
Dim ds As New DataSet
ds = caller.EndInvoke(ar)
MyRep.DataSource = ds
MyRep.DataBind()
End Sub
I am having hard time figuring out why the data repeater is showing no data. While debugging this I see that the dataset is getting the data and is passing the the "ds" but nothing is showing up on my page even though the data is being passed to controls inside data repeater while I am debugging.