data pass from one page to another page

 Hi,

If i have a 3/4 pages and i want to pass the values of the forms and at last i save the data of the forms. Let , my each page contains about 10 values, and user can go previous page to edit. Finally, all the data of the forms are saved. I know Session , but which is the best practice for this?

Thanks..


naqib
dotNet Coder
0
naqib
7/20/2008 7:53:31 PM
asp.net.web-forms 93655 articles. 5 followers. Follow

2 Replies
1612 Views

Similar Articles

[PageSpeed] 22

You have the answer: Session.

You can do this:

Session["data1"] = data1value;

Session["data2"] = data2value;

And on the page where it is needed, go:

decimal price = (decimal)Session["price"];

The casting is necessary. Store each field in the Session, don't be tempted to store a web control (like a gridview) in the Session. This'll cause major performance problems as the grid won't be garbage collected by the runtime.

Lastly, don't put too much info in the Session. If you need to store more data, consider using a table in the database for temp data.

0
HeartattacK
7/20/2008 8:58:52 PM
Thanks a lot
naqib
dotNet Coder
0
naqib
7/21/2008 2:29:25 AM
Reply:

Similar Artilces:

Problem in passing data from one page to another page
i am using session variable to pass the data from one page to another page. i am not able to pass the data from one page to another page . what might be the problem? Session["unm"]="hai"; in another page Response.Write(Session["unm"]); It is not printing any data. i tested the code it is fine !!!!this vb version but does not matter Me.Session("name") = "ss" Me.Response.Write(Session("name"))can you tell me where this code is placed ?? can you show me the function or method that hold your code??? i might be able to help!!Fadil Alnassar www.fadilalnassar.com | FREE Nodil T...

how to navigate the url page in one web application page to another web application page
In my project one solution have 2 web apllications in one folder.like 1.webapplication1 2.webapplication2. in firt webapplication1 i created one aspx page like sample.axpx. in second webapplication2 i created one aspx page like sample2.aspx... in sample2.aspx page have hyperlinl. I need to navigate this hyperlink when i click it go to the sample.axpx. how can i write navigate url for this...help me. ..thanks  As i understand u, you need Multi Project soltuionsee this link, http://community.rainbowportal.net/blogs/jonathans_rainbow_blog/archive/2006/02/19...

Pass grid view data from one page to another page?
Hi all, I want to pass grid view data form one page to another page, for that using following code <asp:HyperLinkField DataTextField="EmpName" DataNavigateUrlFields="EmpName" DataNavigateUrlFormatString="EmpDetails.aspx?EmpName={0}"> Its working fine, but its passes the query string values in the address bar, I want hide that query string or encrypt that values or any other idea to pass data from grid view to another page without using query string Thanks in advance   Have a look. http://www.devcity.net/PrintArticle.aspx?Art...

passing a variable form one page to a sql query in another page
hi, i have a categories page and when the user clicks on a category it is to go to a products page which list all the products in that category. i cant believe it can be that difficult. ive been all round the block on this and have posted a number of messages on another forum but the trail went cold. the story so far... http://www.sitepoint.com/forums/showthread.php?t=396963 any help would be muchly much appreciated! You have several options:  QueryString: You can use querystrings to pass variables from one page to another.  If you are using ASP.NET 2.0, you can use Cross ...

About passing grid cell value from one page to another web page
 Question: How do I extract the grid cell value and pass it to another page ? in general what is the best way to pass a variable from one page to another ?  Kind Regads,   You could use something likeint grandtotal = 0;int cellVal;foreach (GridViewRow row in GridView1.Rows){String cellText = row.Cells[0].Text;            if (Int32.TryParse(cellText, out cellVal) == true){grandtotal += cellVal;}}expendLabel.Text = grandtotal.ToString(); to extract a grid cells data. The best possible method to send data from one page to...

How to open another web page from one web page
Hi, I am writing an asp.net(C#) 2.0 web page with a link to another web page by clicking a button control on the page, so how can I link it in the codes? I cannot access another aspx page class within the current aspx page class.  Thanks If you need to re-direct the user to another page after pressing your Button, then use the Response.Write method like so: Response.Redirect("~/Default.aspx")Thanks, EdMicrosoft MVP - ASP/ASP.NET 1) Response.Redirect( "Destination PageName");2) Response.Transfer("Destination PageName");3) Hyperlink(  set Url="...

Multiple Page Web-forms, without passing earlier pages values to the next one?
I am using RH9, postgreSQL and perl5. Is it possible to get users to submit multiple page web-forms but not to pass values from one form to the next? I would like to store each page to the database server as it is submitted. Also, to build in the process to resume the web-form submission at a later time e.g say there are twent pages to submit and the user stops feeding the forms at the tenth form. I would like to email the user a reminder so he can log back in and start from the eleventh form. Can anyone tell me if this sort of thing is implemented anywhere, so I can study it. Or, can anyone p...

How to databind control in one web page from another web page
Hi all,  I have a listbox control and a button control in a web page. Once the user clicks the button another web page is opened. The new web page will accept some data from the user which will be used to databind the listbox in the first web page. In other words, the two web pages ( the parent window and the child window) are open at the same time. The child page needs to databind a control in the parent page. Is there a way to do it? I need some code. Thx in advance Update: I hate to do this. Looks like I will have to take help of viewstate and session si...

Is it possible to embed part of one web page into another web page?
Any answers will be highly appreciated.  Thanks. If you can adjust the page you want to embed onto the other page, you could use a .ascx (web forms control).  Then you can add controls to it and just drag and drop it using VS.NET from the Solution Explorer window to the webform.  You can then also embed it onto other pages in that same web project easily by drag n drop.  I hope this helps, it's not exactly a portion of a web page but may be an acceptable alternative for you.Rachel AppelMVP - ASPInsider In order to better answer this, I could use some details as ...

A page can have only one server-side Form tag
I have a web user control in my web page.  The user control (ascx) consist of a text box and button. The web page consist of text boxes and buttons also.  Both pages have form tags with runat=server.  When I run the web page it comes up with the error "A page can have only one server-side Form tag." Both the user control and web page need the form tag with runat=server.  Is there a way I can code these pages where there won't be a conflict between the web user control and the web page? Thanks   JohnMo wrote:Both the user control and web page need the form tag wit...

How to pass an object from one page to another page
In my first page i have two textbox, like wise i have 12 pages with almost all the controls. I have a class called StoreValues which has getter and setter for storing the values of all the controls from page1 to page 12. In my first page am creating an instance for StoreValues class and storing two textbox values, in my second page i want that object (which i have created in first page) to store values of other controls. I dont want to use Session object. Any other suggestionSivaraman Krishnan Hi, Sivaraman.Net:I dont want to use Session object. Why...

Who to passing a Variable One web page to other page ??
Who to passing a Variable One web page to other page ?? pl. also differant way of passing variable one page to other page If you find it absolutely necessary to pass values between pages (which is the Classic ASP way of dealing with things) you could read this: Passing Server Control Values Between PagesRegardsAndre Colbiornsen ---------------------------------Seventh DayRåbygatan 1A,SE-223 61 LundSwedenMob.: +46-(0)708-97 78 79Mail: info@seventhday.se--------------------------------...

how to call the data from one page the another page
i would like to call some particular record from one column of gridview from one page1 to another new page,for example:price column in page one,i would like to display the price column value in page2.any idea? Hello,   You can pass values from a gridview to another page using a hyperlink field for that particular column. Within the hyperlink control there is a value you can set in DataNavigateUrlFormatString.  I can remember the make up of the what u enter but search for that and there be loads of pages explaining.   Hope this helps. Kevin   i don really u...

Passing value from one page to another page
Dear sir/madam I am building a page in which value of one page eg.first.aspx in which i have a textfield for validating date(dd\MM\yyyy)and a textarea for writing information and a submit button .For handling event i have first.aspx.cs file  which check for validation of date and which submit information which is written in textarea.Now what i want is that in second.aspx I want to get the valid date entered in textfield and information entered in textarea. Waiting for reply if (Page.PreviousPage != null) { TextBox SourceTextBox = (TextBox)Page.PreviousPage.Fi...

Web resources about - data pass from one page to another page - asp.net.web-forms

Death toll from huge US snow storm rises to 14: officials
Washington (AFP) - At least 14 people have died in five states as a result of the monster snow storm battering the eastern United States, officials ...

Fox News: Megyn Kelly Is Not Conflicted over Donald Trump
Fox News contends there is no conflict of interest in having Megyn Kelly host the upcoming Republican debate, after frontrunner Donald Trump ...

Saskatchewan grieves after school shooting as conflicting accounts emerge - World news - The Guardian ...
‘It’s not something you ever imagine happening here,’ says Indian Nations chief of attack in La Loche, a town of fewer than 3,000 people

Rand Paul Says Michael Bloomberg Wouldn’t Get Many Votes As Independent Because He ‘Doesn’t Have Much ...
With less than a year left in President Barack Obama’s second presidential term, the running to become the 45th President of the United States ...

Des Moines Register endorses Hillary Clinton, Marco Rubio ahead of Iowa caucuses
Hillary Clinton and Marco Rubio won the endorsement of The Des Moines Register on Saturday, with just over a week to go until the Iowa caucuses ...

New York City residents band together to push stuck ambulances out of snow
How's this for # NewYorkValues ? New York City is currently enduring a massive winter storm that's expected to dump up to 30 inches of snow ...

Blue Origin Executes First Successful Relaunch And Landing Of Reusable Rocket
The private sector space race is heating up, and Amazon.com co-founder Jeff Bezos’ Blue Origin is back out in front with the first successful ...

Bill Maher On Oscar’s Lack Of Diversity: It’s Racist Asians Fault
Bill Maher is the latest voice chiming in on the Academy Awards’ #OscarsSoWhite controversy, wherein none of the 20 acting nominees were for ...

Woman Questions Husband's Shooting by Phoenix-Area Police
A Texas woman is questioning what led Phoenix-area police to fatally shoot her unarmed husband at a hotel

China, Iran upgrade ties to carry forward millennia-old friendship
Xinhua China, Iran upgrade ties to carry forward millennia-old friendship Xinhua TEHRAN, Jan. 23, 2016 (Xinhua) Chinese PresidentXi Jinping(R ...

Resources last updated: 1/24/2016 12:31:22 AM