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.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Dorababu MekaRank #457 · 5.5K reputationPosted Sep 22, 2011, 9:20 PM EDT
in your webpage
Pravin MoreRank #1,419 · 1.2K reputationPosted Sep 22, 2011, 9:31 PM EDT
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.
Hiral53 reputationPosted Mar 7, 2013, 9:10 AM EST
Jignesh TrivediRank #16 · 50.3K reputationPosted Mar 7, 2013, 6:00 PM EST
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.