Wrox Home  
Search P2P Archive for: Go

  Return to Index  

aspx_beginners thread: Onclick Handler


Message #1 by "DANIEL RAMSAY" <danielramsay@h...> on Wed, 15 May 2002 18:18:10 +0000
Hi,

I am very new to programming and wondered whether anyone could offer a 
solution to the following problem.

I am tring to design a website where on the first page you enter your name. 
Also on the first page is a button which when clicked I want to take the 
user through to the next page in my solution but also to take there name 
that they have entered into a tex box and place it at the top of every 
subsequent page that they access.

Can you help me to do this?

I look forward to your reply.

Daniel Ramsay


_________________________________________________________________
Chat with friends online, try MSN Messenger: http://messenger.msn.com

Message #2 by "John Ritchie" <jcriv@a...> on Thu, 16 May 2002 21:50:37
> Hi,

I am very new to programming and wondered whether anyone could offer a 
solution to the following problem.

I am tring to design a website where on the first page you enter your 
name. 
Also on the first page is a button which when clicked I want to take the 
user through to the next page in my solution but also to take there name 
that they have entered into a tex box and place it at the top of every 
subsequent page that they access.

Can you help me to do this?

I look forward to your reply.

Daniel Ramsay

I suppose you can save the name in a session state bag and access it
later in your next page.
IE.  In the OnClick event for the first page
  Session("username") = Textbox1.text

in subsequent pages
  Label1.text = Session("username")

I suppose you could save the name in a cookie but I have yet to try 
cookies.



_________________________________________________________________
Chat with friends online, try MSN Messenger: http://messenger.msn.com

Message #3 by "John Tyson" <jtyson@t...> on Thu, 16 May 2002 13:51:15 -0700
With forms authentication you can save the user's name to a cookie and
then pull it up in subsequent pages with User.Identity.Name

Depends on how far you want to go with security on your site though...

-----Original Message-----
From: John Ritchie [mailto:jcriv@a...]
Sent: Thursday, May 16, 2002 2:51 PM
To: aspx_beginners
Subject: [aspx_beginners] Re: Onclick Handler

> Hi,

I am very new to programming and wondered whether anyone could offer a
solution to the following problem.

I am tring to design a website where on the first page you enter your
name.
Also on the first page is a button which when clicked I want to take the

user through to the next page in my solution but also to take there name

that they have entered into a tex box and place it at the top of every
subsequent page that they access.

Can you help me to do this?

I look forward to your reply.

Daniel Ramsay

I suppose you can save the name in a session state bag and access it
later in your next page.
IE.  In the OnClick event for the first page
  Session("username") =3D Textbox1.text

in subsequent pages
  Label1.text =3D Session("username")

I suppose you could save the name in a cookie but I have yet to try
cookies.



_________________________________________________________________
Chat with friends online, try MSN Messenger: http://messenger.msn.com


  Return to Index