hidden fields

H

HockeyFan

I know that <input type="hidden" fields are used within a form, but do
<ASP:HiddenField s have to be in a form to be used?
I've got a VB-based (codebehind) that catches the click event of a button on
the page, does some processing, populates the <ASP: hidden fields, and then I
need to redirect to another page, where I want access to these fields.
I suspect that these have to be inside a form, but figured I should ask.

I'd use a Cache or cookies, but this is sensitive information and I'm not
sure that cookies will be available in all cases. I figure I can use
HiddenFields unless there's a better way.
 
M

Mike Brind

HockeyFan said:
I know that <input type="hidden" fields are used within a form, but do
<ASP:HiddenField s have to be in a form to be used?
I've got a VB-based (codebehind) that catches the click event of a button on
the page, does some processing, populates the <ASP: hidden fields, and then I
need to redirect to another page, where I want access to these fields.
I suspect that these have to be inside a form, but figured I should ask.

I'd use a Cache or cookies, but this is sensitive information and I'm not
sure that cookies will be available in all cases. I figure I can use
HiddenFields unless there's a better way.

Basic HTML - hidden fields should never be used for sensitive
information. Have a look at View Source to see what I mean.

And my (limited) understanding of asp.net is that the entire page is a
form, so it doesn't matter where you put form fields on a page.

If you want some help or pointers on transferring sensitive information
using dotnet, try the people over at
microsoft.public.dotnet.framework.aspnet.
 
P

Patrice

AFAIK HTML fields should always be inside a form (they might be not posted
if outside).

What are you trying to do ? Is this info used client side ? It's likely
better to keep this server side as this is sensitive data...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,143
Latest member
DewittMill
Top