Hi,
In my web application I want to return object of sqldatareader from class.cs file to web.aspx.cs file to show result in TextBox. How will I use the sqldatareader object in web.aspx.cs file. Plz, help me
Thanks,
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Jignesh TrivediPosted Mar 7, 2013, 11:00 PM
as per me, it is not good idea to move datareader between function.
intead of doing this use disconnected mode like dataset, datatable...
hope this will help you.
HiralPosted Mar 7, 2013, 2:10 PM
Pravin MorePosted Sep 23, 2011, 1:31 AM
You not metioned from where you want to return DataReader...i mean if you want to return it from webservice then you cant return DataReader object because this is a stream based object which cannot be serialized.
so you can create List
Thanx,
Pravin.
Dorababu MekaPosted Sep 23, 2011, 1:20 AM
in your webpage