hidden fields?

G

Guest

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 (not sensitive
from the user, but sensitive otherwise) 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
 
O

OHM \( One Handed Man \)

Yes, ASP.NET controls needs to be within the FORM tag, try taking them
outside and see what error message you get !
 
B

bruce barker \(sqlwork.com\)

if your page responds with a redirect, you are sending back to the browser
the url to redirect to. your hidden field are of no use, as the browser will
not include them in the redirected request.

-- bruce (sqlwork.com)
 
G

Guest

Well is there another way to get to the next page without a redirect? is
there another way to accomplish what I want without using hidden fields?
 
O

OHM \( One Handed Man \)

You could

1.) Pass parameters in the redirection string to the page you redirect to.
2.) Store the information in session before redirection.
3.) Use a standard field, make it tiny and shove it out of the way, set the
forground and background color to the page background color.
 
G

Guest

Is there any way to (within a codebehind) to set up a Continue button, that
will change the form ACTION to a new screen, and that the data will be posted
there instead of posted back?
 

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,770
Messages
2,569,583
Members
45,073
Latest member
DarinCeden

Latest Threads

Top