[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

passing dataset from one page to another

Posted on 2014-04-09
7
Medium Priority
?
476 Views
Last Modified: 2014-04-23
hi ,
     My task is on clicking a button all the values in the from and grid should pass to another Page. for example if click submit button in page A , all details(form and grid) form page A  should transfer to page B. here in page be i should assign these values.


My problem is in Page B grid is initialized only on row on page load. how to add rows dinamicatlly and assign the values.


Thanks in advance
0
Comment
Question by:codeoxygen
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
7 Comments
 
LVL 22

Expert Comment

by:Mrunal
ID: 39988535
Better way ideally you have to keep this data in cache/session.
0
 

Author Comment

by:codeoxygen
ID: 39988671
my problem is not passing data ... but how to assign the values to grid manually
0
 
LVL 13

Expert Comment

by:Jitendra Patil
ID: 39991124
can you post your .aspx and .cs code here, so that we can help you in better way?

just making assumtion, if you are passing dataset from one page to another using session, you just need to create an object of dataset or datatable, cast the data from session as below.
DataSet Dt= (DataSet)session["sessiondata"];
and bind the gridview with dataset object as
gridview.datasource=dt;
gridview.databind();

hope this helps.
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 

Author Comment

by:codeoxygen
ID: 39993390
my problem is , i have grid view , it has add new row button.  If i want bind data from a data-set. what is the method. the scenario is, already saved grid-view data should be retrieve and even it should be editable
0
 

Author Comment

by:codeoxygen
ID: 39993401
private void FirstGridViewRow()
        {
            DataTable dt = new DataTable();
            DataRow dr = null;
            dt.Columns.Add("RowNumber", typeof(int));
            dt.Columns["RowNumber"].AutoIncrement = true;
            dt.Columns["RowNumber"].AutoIncrementSeed = 1;
            dt.Columns["RowNumber"].AutoIncrementStep = 1;
           
            dt.Columns.Add(new DataColumn("Col2", typeof(string)));
            dt.Columns.Add(new DataColumn("Col3", typeof(string)));
            dt.Columns.Add(new DataColumn("Col4", typeof(string)));
            dt.Columns.Add(new DataColumn("Col5", typeof(string)));
            dt.Columns.Add(new DataColumn("Col6", typeof(string)));
            dt.Columns.Add(new DataColumn("Col7", typeof(string)));
            dt.Columns.Add(new DataColumn("Col8", typeof(string)));
         

            dr = dt.NewRow();
            //dr["RowNumber"] = 1;
            //dr["Col1"] = dr["RowNumber"].ToString();
            dr["Col2"] = string.Empty;
            dr["Col3"] = string.Empty;
            dr["Col4"] = string.Empty;
            dr["Col5"] = string.Empty;
            dr["Col6"] = string.Empty;
            dr["Col7"] = string.Empty;
            dr["Col8"] = string.Empty;
         

            dt.Rows.Add(dr);
            Session["CurrentTable"] = dt;
            dgdItem.DataSource = dt;
            dgdItem.DataBind();
        }


this is the grid which loads at the time of pageload. if button is clicked new row will be added. If want to add data set at the time of page load what is the prodecure
0
 
LVL 13

Accepted Solution

by:
Jitendra Patil earned 1000 total points
ID: 39993712
0
 

Author Comment

by:codeoxygen
ID: 40001624
guru , thanks for ur answer.

but my problem is how to data to grid which exactly like
http://www.aspsnippets.com/Articles/Adding-Dynamic-Rows-in-ASP.Net-GridView-Control-with-TextBoxes.aspx

and after binding . the grid should be editable this my requirement
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article discusses the ASP.NET AJAX ModalPopupExtender control. In this article we will show how to use the ModalPopupExtender control, how to display/show/call the ASP.NET AJAX ModalPopupExtender control from javascript, how to show/display/cal…
In this Article, I will provide a few tips in problem and solution manner. Opening an ASPX page in Visual studio 2003 is very slow. To make it fast, please do follow below steps:   Open the Solution/Project. Right click the ASPX file to b…
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Suggested Courses

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question