473,388 Members | 1,207 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,388 software developers and data experts.

Display Session Variable in textbox?

I want to display a session variable as a textbox value:

<input type="text" ...... value="<%=Session("myvar")%>">

I've tried several different variation of this and can't get it to display
properly with any.

Help please?

Sean
Jul 22 '05 #1
4 15999
<%
Session("MySession")="abcdefg"
sTemp = Session("MySession")
%>

<input type="text" value="<%=sTemp%>" name="txtSessionValue">

--
Regards

Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk

Keeping it FREE!

"What-a-Tool" <Di*************************@IHateSpam.Com> wrote in message news:KDh%d.70114$SF.58946@lakeread08...
I want to display a session variable as a textbox value:

<input type="text" ...... value="<%=Session("myvar")%>">

I've tried several different variation of this and can't get it to display
properly with any.

Help please?

Sean



Jul 22 '05 #2
Does it work if you just do <%=Session("myvar")%> straight to the screen?
(My guess is that the session variable is empty, because your syntax below
looks fine... as long as the session variable can't contain "
On 3/20/05 11:36 AM, in article KDh%d.70114$SF.58946@lakeread08,
"What-a-Tool" <Di*************************@IHateSpam.Com> wrote:
I want to display a session variable as a textbox value:

<input type="text" ...... value="<%=Session("myvar")%>">

I've tried several different variation of this and can't get it to display
properly with any.

Help please?

Sean


Jul 22 '05 #3
What my posted code string displays in the text box is :
"<%=Session(" -inside the text box, and a final ">" -outside the
text box


"Aaron [SQL Server MVP]" <te*****@dnartreb.noraa> wrote in message
news:BE631B1B.407C%te*****@dnartreb.noraa...
Does it work if you just do <%=Session("myvar")%> straight to the screen?
(My guess is that the session variable is empty, because your syntax below
looks fine... as long as the session variable can't contain "
On 3/20/05 11:36 AM, in article KDh%d.70114$SF.58946@lakeread08,
"What-a-Tool" <Di*************************@IHateSpam.Com> wrote:
I want to display a session variable as a textbox value:

<input type="text" ...... value="<%=Session("myvar")%>">

I've tried several different variation of this and can't get it to
display
properly with any.

Help please?

Sean

Jul 22 '05 #4
Thank you for your help - got it working - just noticed I was doing
something stupid that I kept overlooking.

Thank you again
"Aaron [SQL Server MVP]" <te*****@dnartreb.noraa> wrote in message
news:BE631B1B.407C%te*****@dnartreb.noraa...
Does it work if you just do <%=Session("myvar")%> straight to the screen?
(My guess is that the session variable is empty, because your syntax below
looks fine... as long as the session variable can't contain "
On 3/20/05 11:36 AM, in article KDh%d.70114$SF.58946@lakeread08,
"What-a-Tool" <Di*************************@IHateSpam.Com> wrote:
I want to display a session variable as a textbox value:

<input type="text" ...... value="<%=Session("myvar")%>">

I've tried several different variation of this and can't get it to
display
properly with any.

Help please?

Sean

Jul 22 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

15
by: | last post by:
Hi, I want to do things this way: I have a bunch of stuff that I want to keep track of while a user is connected to the site. Maybe 50 little peices of information. So I know I can make 50...
5
by: Scott | last post by:
I'm trying to set a session variable after displaying a form, then capture the Session variable on postback. For some reason, the below code always returns the form, not the "Step 2" results part....
2
by: John Holmes | last post by:
I have a web interface where the user types in ID's one at a time. After an ID is typed in, a button is clicked and the button click event has code that does a query and returns a data reader and...
2
by: Joe Molloy | last post by:
Hi, This isn't a mission critical question but I thought I'dl throw it out there for your feedback as it's a bit curious. I have developed a shopping cart for an application I'm working on...
2
by: Todd | last post by:
Here's one that has been stumping people: I'm writing in ASPX with VB.NET On the login page I set the entered usename text to a session variable....
5
by: TRB_NV | last post by:
I'm losing information from my Session when I change pages or start the same page over again. I simplified the code so the example is really clear. The sample code that follows is supposed to...
1
by: SLH | last post by:
i have an asp page with a form that posts to itself. (the action of the form is the same page the form is on). i validate input and dont accept it if there is something wrong with it. problem is...
1
by: adriann | last post by:
Hi, I have a page that displays Mysql query results in either "simple" or "detailed" format. The directive to display in the desired format is obtained by looking at the value of a Session variable....
7
by: ltarrant | last post by:
Hi, I'm having problems with a DataTable I'm storing in a session variable. I use this as a temporary store for a shopping cart until a customer goes through the checkout and the cart is saved to my...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.