By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,617 Members | 1,166 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,617 IT Pros & Developers. It's quick & easy.

hidden fields?

P: n/a
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
Apr 14 '06 #1
Share this Question
Share on Google+
5 Replies


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

--
( OHM ) - One Handed Man
AKA Terry Burns - http://TrainingOn.net
"HockeyFan" <Ho*******@discussions.microsoft.com> wrote in message
news:70**********************************@microsof t.com...
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

Apr 14 '06 #2

P: n/a
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)
"HockeyFan" <Ho*******@discussions.microsoft.com> wrote in message
news:70**********************************@microsof t.com...
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

Apr 14 '06 #3

P: n/a
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?

"bruce barker (sqlwork.com)" wrote:
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)
"HockeyFan" <Ho*******@discussions.microsoft.com> wrote in message
news:70**********************************@microsof t.com...
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


Apr 15 '06 #4

P: n/a
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.

--
( OHM ) - One Handed Man
AKA Terry Burns - http://TrainingOn.net
"HockeyFan" <Ho*******@discussions.microsoft.com> wrote in message
news:09**********************************@microsof t.com...
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?

"bruce barker (sqlwork.com)" wrote:
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)
"HockeyFan" <Ho*******@discussions.microsoft.com> wrote in message
news:70**********************************@microsof t.com...
>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


Apr 15 '06 #5

P: n/a
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?

"OHM ( One Handed Man )" wrote:
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.

--
( OHM ) - One Handed Man
AKA Terry Burns - http://TrainingOn.net
"HockeyFan" <Ho*******@discussions.microsoft.com> wrote in message
news:09**********************************@microsof t.com...
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?

"bruce barker (sqlwork.com)" wrote:
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)
"HockeyFan" <Ho*******@discussions.microsoft.com> wrote in message
news:70**********************************@microsof t.com...
>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


Apr 17 '06 #6

This discussion thread is closed

Replies have been disabled for this discussion.