.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Forum >> ASP.Net >> Post New QuestionBookmark and Share Subscribe to Forum

How to pass the dataset from one page to another page in Asp.Net using properties

Posted By: Ellickakudy Rajeesh     Posted Date: August 25, 2011    Points:5   Category :ASP.Net
How to pass the dataset from one page to another page in Asp.Net using properties any idea?

Responses
Author: Amit Mehra             
Posted Date: August 25, 2011     Points: 20   

Hi,

You can pass dataset from one page to another page in Asp.Net using properties only if page cycle is not completed. Once the asp.net page cycle is completed than you can not pass using properties you can use session for that.

Hope this will give you an idea

Thanks,
Amit
Please "Mark As Answer " if this post help you.
Author: Ellickakudy Rajeesh             
Posted Date: August 25, 2011     Points: 20   

Hi Amit,

Thank you for your replay..
is there is any demerit to store a dataset in session or any another way to paging in asp. net.

Thanks,
Rajeesh

Author: Amit Mehra             
Posted Date: August 25, 2011     Points: 20   

Hi Rajeesh,

No, there is no harm if your dataset size is less..

Thanks,
Amit
Please "Mark As Answer " if this post help you.
Author: Gowthammanju             
Posted Date: August 29, 2011     Points: 20   

try these coding as


You can store your DataSet in Session since you need to use it in other pages. That way you can use the value of Session, cast it as a Dataset and use it as your DataSource.


DataSet ds = //Set DataSource
Session["key"] = ds;

//Then on Page2.aspx use this codes below to use the DataSet stored in Session

if (Session["key"] != null)
{
DataSet dsCurrent = (DataSet)Session["key"];
GridView1.DataSource = dsCurrent;
GridView1.DataBind();
}


Thanks & Regards,
GowthamManju
Chennai



Mark if the answer is true


Post Reply

You must Sign In To post reply
 
 
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery
JavaScript/VBScriptBiztalkWPFPatten/PracticesWCFOthers
www.DotNetSpark.comUnAnsweredAll

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend