473,406 Members | 2,371 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,406 software developers and data experts.

Passing values to a Web Page

HI,
i need to pass a value from a Web Page to another in
ASP.NET, eg. i want to keep the user name from a login
page and diplay to next page . What should I use?
Thanks,
fabrizio
Nov 15 '05 #1
2 4590
Jim
Well, If you're using asp .NET controls (ie a webform
with a <form... runat="server"> in it, then the asp form
handles all that for you, and stores the values of the
form fields in their related variables on the code page.

If you're just donig it with an ordinary .asp page, then
yuo have two choices-- You can get the login name on a
<form>, and then send it to the called page either using
<form method="post"> to send it in the http header, or
<form method="get"> to send it as part of the url. the
action"..." attribute of the form tag will determine what
page is called, and on that asp page, you then chek the
contents of the request.forms object for the variable.

I may have a couple of the class / object names a little
off here, but basically that's how you do it. If you're
real new to asp .NET, you might want to donwload
the "IBUYSPY" example web. It's in VB though I think. It
is to asp .NET what Northwind is to SQL server and
Access. I hope that helps!

JIM
-----Original Message-----
HI,
i need to pass a value from a Web Page to another in
ASP.NET, eg. i want to keep the user name from a login
page and diplay to next page . What should I use?
Thanks,
fabrizio
.

Nov 15 '05 #2

Hi Fabrizio,

Just as Jim said, you can use either the feature of Asp.net page or use
ordinary "post" or "get" way.
After you login, I think you can keep the information of certain user
during operation through session.
And you also can keep the application scope status in application variables.
The article below tells you how to use session and application object in
asp.net:
http://msdn.microsoft.com/msdnmag/is...g/default.aspx
http://msdn.microsoft.com/msdnmag/is...g/default.aspx

Hope this helps,
Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

--------------------
| Content-Class: urn:content-classes:message
| From: "Fabrizio" <fm******@gestionescorte.it>
| Sender: "Fabrizio" <fm******@gestionescorte.it>
| Subject: Passing values to a Web Page
| Date: Tue, 18 Nov 2003 12:36:27 -0800
| Lines: 6
| Message-ID: <0a****************************@phx.gbl>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="iso-8859-1"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
| Thread-Index: AcOuE6PscTBNJ9dWQ+q4K1zzx9cnYQ==
| Newsgroups: microsoft.public.dotnet.languages.csharp
| Path: cpmsftngxa06.phx.gbl
| Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.csharp:200283
| NNTP-Posting-Host: TK2MSFTNGXA08 10.40.1.160
| X-Tomcat-NG: microsoft.public.dotnet.languages.csharp
|
| HI,
| i need to pass a value from a Web Page to another in
| ASP.NET, eg. i want to keep the user name from a login
| page and diplay to next page . What should I use?
| Thanks,
| fabrizio
|

Nov 15 '05 #3

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

Similar topics

5
by: Paul | last post by:
I want to use sessions to cover myself in case the user switches off cookies so I am passing the session ID manually through a hidden input field. This is what I have so far. index.php page...
1
by: Paul | last post by:
Hmmm, didn't seem to work. I have set session.use_cookies = 1 and session.use_trans_sid = 1 in my php.ini file. Index.php contains:...
12
by: Kevin Lyons | last post by:
Hello, I am trying to get my select options (courses) passed correctly from the following URL: http://www.dslextreme.com/users/kevinlyons/selectBoxes.html I am having difficulty getting the...
5
by: Jack | last post by:
Hi, I need to pass multple variables in a link in order to go to a asp page with the two varables. The following are the values of the variables using response.write: <%'Response.Write Mypage...
2
by: Gordon Hudson | last post by:
Hello Here is what I am trying to do: Make a hyperlink on a data entry form with its URL built from the values for fields in that entry on the database. So, I would go to record 65785 click...
7
by: Anne | last post by:
hie there, i want to be able to pass multiple parameters to another page. currently, i am able to do so, but somehow i feel it is not the correct way to do it. below is part of what i have so far....
1
by: Russell | last post by:
Hi there, I'm currently creating a .NET Web Application and I have a question about passing values from one screen to another. I previously used Session variables in the code to store these...
1
by: olduncleamos | last post by:
Hello all. With a background in ASP, I am finding the work required for passing values between pages mystifying. For various obvious reasons, I have eliminated using cookies and session to store...
2
by: Ganesh | last post by:
Hi there, I'm new to .net just started with 2005 and asp.net 2.0, I'm passing control values to other page to retrieve the data from data set based on the passing values. It works fine. But when...
5
by: jmartmem | last post by:
Greetings, I have built an Update Record Form in an ASP page. This form contains a number of fields, such as text boxes and menus, to name a few. Upon clicking the 'submit' button, I want the...
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: 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
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
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.