Hi *.* !
I would like to transfer some values (state) from one page to
another, but I have a problem...
My pages are called after clicking the dynamic menu item from
the page, so I don't know the page to call using "Server.Transfer"
method.
Is there any way to set the Context to be automatic
transfered ? Any other sugestions ?
Roberto 6 1039
I would add the data to session, then remove the data from session
after you the transferred page is loaded. if it is not a lot of data,
say a simple string or int, just append it to the url.
I have tested and It doesn't work.
If I use the Session or QueryString methods, I need to specify the next
page too....
Please see mmy example to help me:
I) Using SESSION:
Page 1:
-----------
Session["VarA"] = "1";
// Response.Redirect("???.aspx"); <-- If not executed, the
session doesn't go to next page.
Page 2, 3 or 4:
----------------------
string str = Session["VarA"].ToString() // Null
II) Using QUERY STRING:
Using query string the same problem occurs, because I need to
specify the next page:
Response.Redirect("????.aspx?VarA=" + txtValue.Text);
Are you using ASP.NET 2.0 ?
If you are, it's quite simple to use cross-page posting and the PreviousPage property : http://msdn2.microsoft.com/en-us/library/ms178139.aspx
Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en espańol : http://asp.net.do/foros/
===================================
<ro*************@gmail.com> wrote in message
news:11********************@u72g2000cwu.googlegrou ps.com... I have tested and It doesn't work. If I use the Session or QueryString methods, I need to specify the next page too....
Please see mmy example to help me:
I) Using SESSION:
Page 1: ----------- Session["VarA"] = "1"; // Response.Redirect("???.aspx"); <-- If not executed, the session doesn't go to next page.
Page 2, 3 or 4: ---------------------- string str = Session["VarA"].ToString() // Null
II) Using QUERY STRING:
Using query string the same problem occurs, because I need to specify the next page:
Response.Redirect("????.aspx?VarA=" + txtValue.Text);
I found what the problem !!!
I was using the "cookieless" option and somehow it was forcing me to
use Response.Redirect or Server.Trasnfer.
Web.config:
<sessionState cookieless="true"></sessionState>
After removing this entry, the SESSION started working just great !
Thanks !
Juan,
I found the problem !
I was using the cookieless option in web.config file and somehow it was
interfering...
Web.config:
<sessionState cookieless="true"></sessionState>
After removing this line from web.config file, I didn´t need to use
Response.Redirect command anymore !
Thank you,
Roberto
Just a note. you could do query string because at tun time, you will
know the page (i.e, ????). use this as a variable as well.
Glad it is working. ro*************@gmail.com wrote: Juan,
I found the problem !
I was using the cookieless option in web.config file and somehow it was interfering...
Web.config: <sessionState cookieless="true"></sessionState>
After removing this line from web.config file, I didn´t need to use Response.Redirect command anymore ! Thank you, Roberto This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Xah Lee |
last post by:
is it possible to write python code without any indentation?
Xah
xah@xahlee.org
http://xahlee.org/PageTwo_dir/more.html
|
by: Chad Crowder |
last post by:
I've taken a look at this article
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnaspnet/html/asp12282000.asp
which someone posted a month or so ago regarding setting up SQL...
|
by: Johan Nedin |
last post by:
Hello!
I have a problem with SQLSession state on my ASP.NET pages.
SQLSession state behaves very different from InProcess session state,
which I think is very bad.
I can understand some of...
|
by: Daniel Walzenbach |
last post by:
Hi,
I have a web application which sometimes throws an “out of memory”
exception. To get an idea what happens I traced some values using performance
monitor and got the following values (for...
|
by: Neo |
last post by:
hi,
This is my first post in C++ group, so please be nice to me. Thanks.
Also, I will post my first C++ program following. There is a compile
error, I cannot figure it out even I can fix it. And...
|
by: Shawnk |
last post by:
This post is intended to verify that true value semantics DO NOT EXIST for the
Enum class (relative to boolean operations).
If this is true then (thus and therefore) you can not design state...
|
by: weaknessforcats |
last post by:
Design Patterns – State
Often computer software operates based on a condition called a state. These states traditionally have been implemented using a switch statement. The cases of the switch...
|
by: tuom.larsen |
last post by:
Dear list,
I'm writing very simple state machine library, like this:
_state = None
def set_state(state):
global _state
_state = state
|
by: laktofil |
last post by:
This may seem like an abstract question on behavioral inheritance. Anyway, I'm building a hierarchical state machine in C++ (with gcc for target platform Gentoo Linux). More precisely, I'm using this...
|
by: W Karas |
last post by:
Virtual functions could have multiple definitions, for different
object states.
The prototype of a virtual member function could have an optional
reserve word "for" followed by a comma-separated...
|
by: DolphinDB |
last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation.
Take...
|
by: DolphinDB |
last post by:
Tired of spending countless mintues downsampling your data? Look no further!
In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
|
by: Aftab Ahmad |
last post by:
Hello Experts!
I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
|
by: Aftab Ahmad |
last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below.
Dim IE As Object
Set IE =...
|
by: ryjfgjl |
last post by:
ExcelToDatabase: batch import excel into database automatically...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: marcoviolo |
last post by:
Dear all,
I would like to implement on my worksheet an vlookup dynamic , that consider a change of pivot excel via win32com, from an external excel (without open it) and save the new file into a...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: Vimpel783 |
last post by:
Hello!
Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
| |