473,401 Members | 2,125 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,401 software developers and data experts.

Store Textfield value in Session variable

PLA2000
I want to store a value that I enter in a textfield in a session variable to use on another page without submitting the value to a data table.

I tried:

<% Session(“firstname”)= Request.Form(“First”) %>

I also tried:

<% Session(“firstname”)= First.Text %>

Neither worked but

<% Session(“firstname”)= "John" %>

does work and the value is available on subsequent page.

Please help,

Peter A
Sep 28 '08 #1
3 4685
DrBunchman
979 Expert 512MB
Hi Peter,

Welcome to Bytes.com! I hope you find the site useful.

Have you tried outputting the value of Request.Form(“First”) to the page? You'll probably find that the value isn't being passed correctly as otherwise I would expect it to be stored in the session variable with your first bit of code. Use a Response.Write Request.Form(“First”) to see what it contains.

Let me know how it goes,

Dr B
Sep 29 '08 #2
DrB,

Thanks for the tip. Form("First") does not return any value. I'll try some other ways to capture the value in the session variable.

Peter

Hi Peter,

Welcome to Bytes.com! I hope you find the site useful.

Have you tried outputting the value of Request.Form(“First”) to the page? You'll probably find that the value isn't being passed correctly as otherwise I would expect it to be stored in the session variable with your first bit of code. Use a Response.Write Request.Form(“First”) to see what it contains.

Let me know how it goes,

Dr B
Sep 30 '08 #3
deric
92
Hi...
I think it will really not output anything because the textfield "First" doesn't exist in the previous page. Request.Form() will get a value from the querystring or from the previous page that called this current page.
In order for you to set the value of the session variable, you need to submit the page and do the setting of the session on the receiving page.

Can you try to check if this will work: place <% Session(“firstname”)= Request.Form(“First”) %> at the end of the source code. I have not actually tried it, and Im not able to try it at this moment coz I dont have access to an ASP server right now. ;(
Sep 30 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

11
by: Colin Steadman | last post by:
Hope this makes sense! I'm building an ASP page which allows uses to add items to an invoice via a form, ie: Item No Part No Order No Quanity Units Price VAT ------- ...
13
by: Stumped and Confused | last post by:
Hello, I really, really, need some help here - I've spent hours trying to find a solution. In a nutshell, I'm trying to have a user input a value in form's textfield. The value should then be...
3
by: Michelle Stone | last post by:
hi al i have "variab1 = window.open ("a.aspx", "helloworld"); i do this inside a RegisterStartupScrict ("key", "<script language=javascript>******</script>"); where ***** is hte javascript...
2
by: jmensch | last post by:
Hello. I'm a reasonably new ASP.NET programmer with no prior ASP or web development experience, but a lot of general programming experience. I'm using Visual Web Developer Beta Express 2005. ...
1
by: bonnie.tangyn | last post by:
Hello all Would it be possible to store javascript document.forms.value to ASP session as global variable? If it is not possible, how can I pass the javascript document.forms.value to...
2
by: bonnie.tangyn | last post by:
Hello all Would it be possible to store javascript document.forms.value to ASP session as global variable? If it is not possible, how can I pass the javascript document.forms.value to...
9
by: learning | last post by:
Hi! Here's my situation: I have one textfield with one 'submit' button in PAGE1.PHP. When I click on the 'submit' button I am sent to PAGE2.PHP where I have a "switch" routine that checks...
4
by: wish | last post by:
Hi all, Where is the location for store session variable? Because i feel that the session variable is keep store the previous variable and no release the variable. When i click back button,...
0
by: harshad | last post by:
Dear All,Here I am facing problem to store image.I am trying to store byte array(image) in to session variable so at time of update I will got that byte array and I do my update. here i am given...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.