M
Mark Rae [MVP]
OK, Mark, I don't know where I am going wrong:
accountNumber.Text = Session["acct"].ToString()accountNumber = Session["acct"].ToString()
Assuming accountNumber is a TextBox control...
OK, Mark, I don't know where I am going wrong:
accountNumber.Text = Session["acct"].ToString()accountNumber = Session["acct"].ToString()
Mark Rae said:OK, Mark, I don't know where I am going wrong:accountNumber.Text = Session["acct"].ToString()accountNumber = Session["acct"].ToString()
Assuming accountNumber is a TextBox control...
Of couse the agents.aspx is inclosed in quotes (typo) in the redirect
line.
I also tried commenting out the session variable statements and tried
"agents.aspx?acct=1106" and used the Request.QueryString("acct"). This
didn't give an exception (and took me to the page), but didn't set the
accountNumber.Text either.
Request.QueryString("acct").ToString()
Also, with the Redirect, the back button becomes disabled. Is this
expected ?
(A)Mark Rae said:And it's Response.Redirect, not Resume.Redirect - missed that in my
previous reply...
No..
Also, using the other method, why couldn't I set a session variable. It
complained about that line. When I put in that line and started typing
session, it filled out the word "Session". But after I put in the rest
andgot to the acct.Text part, it didn't present me with acct (or anything,
for that matter) when I started typing it. If I start a line with ac it
presents me with the control acct, just not after the 'Session["acct"] ='
start of the line.
Mark Rae said:Also, using the other method, why couldn't I set a session variable. It
complained about that line. When I put in that line and started typing
session, it filled out the word "Session". But after I put in the rest
andgot to the acct.Text part, it didn't present me with acct (or
anything, for that matter) when I started typing it. If I start a line
with ac it presents me with the control acct, just not after the
'Session["acct"] =' start of the line.
Apologies, I think that's my fault...
I never go anywhere near VB.NET, so I sometimes forget the syntatical
differences...
If, instead of Session["acct"] you try Session("acct") does it work...?
Mark, I figured it out. I went into the debugger and found that the
Page_Load routine in the target page was not firing. I figured out why.
It is because I did not have "Handles Me.Load" at the end of the
subroutine declaration.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.