473,657 Members | 2,389 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

safest way to pass parameters between pages

Hi,

I have a few aspx (.net2) form.

The first form allows the user to enter into text box, and select values
from drop downs

The second form needs to use these values to process some data.

I am currently using the url to pass the values such as
'pagename.aspx? parm1=value&par am2=value, and the second form does a
request.headers ("parm1")

However this exposes the values in the browser, and I don't want this.

Is there a way to do this where its hidden from the user ?

Thanks

Oct 8 '07 #1
3 3173
"Aussie Rules" <Au*********@no spam.nospamwrot e in message
news:u8******** ******@TK2MSFTN GP03.phx.gbl...
I have a few aspx (.net2) form.

The first form allows the user to enter into text box, and select values
from drop downs

The second form needs to use these values to process some data.

I am currently using the url to pass the values such as
'pagename.aspx? parm1=value&par am2=value, and the second form does a
request.headers ("parm1")

However this exposes the values in the browser, and I don't want this.

Is there a way to do this where its hidden from the user ?
Generally speaking, in ASP.NET there is no need to use two forms for this -
that is what a postback is for...

When the user clicks the <asp:Button>, the form will postback and the values
in the textboxes will be available for you to do your processing.
Afterwards, you can redirect to another page if you like, but there's no
need to...

http://www.google.co.uk/search?sourc...ET%22+postback
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Oct 9 '07 #2
Where did you get this "request.header s("parm1") stuff?
Your stuff is on the QueryString. You would get it with
Request.QuerySt ring("parm1") or
Request.Params( "parm1")

-- Peter
Recursion: see Recursion
site: http://www.eggheadcafe.com
unBlog: http://petesbloggerama.blogspot.com
BlogMetaFinder: http://www.blogmetafinder.com

"Aussie Rules" wrote:
Hi,

I have a few aspx (.net2) form.

The first form allows the user to enter into text box, and select values
from drop downs

The second form needs to use these values to process some data.

I am currently using the url to pass the values such as
'pagename.aspx? parm1=value¶m2 =value, and the second form does a
request.headers ("parm1")

However this exposes the values in the browser, and I don't want this.

Is there a way to do this where its hidden from the user ?

Thanks

Oct 9 '07 #3

Hi Aussie,

Generally, for share data between web pages, you can use querystring,
session, database ........ However, for ASP.NET 2.0 page, it also provide
some particular features, such as the cross page postback(if you are using
submit/postback to redirect to other page). Or you can use Server.Transfer
to redirect page and use HttpContext.Ite ms collection to store temp data.
Here is a msdn reference mentioend some of them:

#How to: Pass Values Between ASP.NET Web Pages
http://msdn2.microsoft.com/en-us/lib...fw(VS.80).aspx

BTW, do you think the suggestion that use single page with postback from
other members also possible for your case?

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
>From: "Aussie Rules" <Au*********@no spam.nospam>
Subject: safest way to pass parameters between pages
Date: Tue, 9 Oct 2007 00:22:22 +0100
>Hi,

I have a few aspx (.net2) form.

The first form allows the user to enter into text box, and select values
from drop downs

The second form needs to use these values to process some data.

I am currently using the url to pass the values such as
'pagename.aspx ?parm1=value&pa ram2=value, and the second form does a
request.header s("parm1")

However this exposes the values in the browser, and I don't want this.

Is there a way to do this where its hidden from the user ?

Thanks

Oct 9 '07 #4

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

Similar topics

1
5969
by: Ravi & Paami | last post by:
After I tried upgrading my php version from 3 to 4, all my code which passes parameters between web pages have stopped working. Not sure what the problem is. Have tried defining the parameters in the accepting php page with a '$_GET; and also a $_REQUEST; but with no luck. Even tried Globals without any luck. Below is an eg. of what I am trying to do.. ------------------------ From an html page, - 'eg1.html', I am attempting to call a...
7
21612
by: Zlatko Matić | last post by:
Let's assume that we have a database on some SQL server (let it be MS SQL Server) and that we want to execute some parameterized query as a pass.through query. How can we pass parameters to the server ? Is it possible to use parameters in pass-through queries ? An additional question: Is it possible to connect to a database on MySQL or PostgreSQL using ADO ? Is it possible to execute pass-through queries with parameters, using ADO...
0
3316
by: Zlatko Matić | last post by:
Hi everybody! Recently I was struggling with client/server issues in MS Access/PostgreSQL combination. Although Access is intuitive and easy to use desktop database solution, many problems appear when someone is trying to use it as front-end for real server database systems such as PostgreSQL or MySQL. One of these problems is regarding pass-through queries and parameters. I wanted to have all the code on client, while executing it on...
7
2207
by: Spongebob | last post by:
Hello, I have a question about how to pass information between pages in ASP.NET. There are 2 pages : page1.aspx, page2.aspx. On page1 user clicks the record. Then, I need to show the detailed info about that record in page2. How to pass the ID of record? Should I use querystring or cookies or session variable? The problem is:
9
2311
by: Alan Silver | last post by:
Hello, I'm a bit surprised at the amount of boilerplate code required to do standard data access in .NET and was looking for a way to improve matters. In Classic ASP, I used to have a common function that was included in all pages that took an SQL query and returned a disconnected recordset. This meant that data access could be achieved in a single line. I would like to do something similar in ASP.NET. I know I could just duplicate...
2
1476
by: rinat | last post by:
Hi, I have an aspx page who needs to open a asp page and pass some text parameters to it, I would have used the request.querystring but I'm afraid the data is too long. is there an option to use the Request.Form way? thanks a lot :) Rinat
0
1433
by: H5N1 | last post by:
Hi there I know that a problem of different datetime strings formatting between asp.net and ms sql has been covered here widely, but what I couldn't find is the 100% safe way of getting datetime values from ms sql, processing them in asp.net and getting them back into sql without any risk with inconsistent Culture settings etc. My question is: wouldn't keeping the datetime variables all the time in datetime type, without any String...
2
3209
by: gumby | last post by:
I would like to call this stored procedure, but I am unable to pass parameters to the @Start and @End. Is thier a way to pass parameters to a pass through query from MS Access? SELECT COUNT(dbo.tblPersActionHistory.PersActionID) AS , .fn_FindStartPayPeriod(dbo.tblPersActionHistory.PersActionID, 2) AS FROM dbo.tblPersActionLog INNER JOIN
2
11303
by: =?Utf-8?B?U3RldmVuIFRhbmc=?= | last post by:
I'm creating a XBAP application and want it take some input from webpage dynamically? what is the best way? how to do it? Best Regards Steven -- ======================= Steven Tang SYWWUYU)
0
8324
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8842
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
7352
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6176
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5642
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4330
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2742
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1970
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1733
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.