|
.net
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
hidden fields?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 Yes, ASP.NET controls needs to be within the FORM tag, try taking them
outside and see what error message you get ! Show quoteHide quote "HockeyFan" <Hockey***@discussions.microsoft.com> wrote in message news:7017D226-531D-418F-8A49-262D5DA20A1C@microsoft.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 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) Show quoteHide quote "HockeyFan" <Hockey***@discussions.microsoft.com> wrote in message news:7017D226-531D-418F-8A49-262D5DA20A1C@microsoft.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 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? Show quoteHide quote "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" <Hockey***@discussions.microsoft.com> wrote in message > news:7017D226-531D-418F-8A49-262D5DA20A1C@microsoft.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 > > > 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. Show quoteHide quote "HockeyFan" <Hockey***@discussions.microsoft.com> wrote in message news:091369E3-AAE1-4C0B-829A-FC3E91B08C63@microsoft.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" <Hockey***@discussions.microsoft.com> wrote in message >> news:7017D226-531D-418F-8A49-262D5DA20A1C@microsoft.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 >> >> >> 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? Show quoteHide quote "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" <Hockey***@discussions.microsoft.com> wrote in message > news:091369E3-AAE1-4C0B-829A-FC3E91B08C63@microsoft.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" <Hockey***@discussions.microsoft.com> wrote in message > >> news:7017D226-531D-418F-8A49-262D5DA20A1C@microsoft.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 > >> > >> > >> > > >
Other interesting topics
Session state IIS (Machine Key | Load Balanced Session)
New to ASP Is this AJAX? (Sort of "Off Topic") Convert New Lines to BRs Translating ID bound to label in detailsView to NAME basing on different datasource. ASP.NET: Can't Kill EXCEL.exe with Office PIA Update Query in formview Anyone care to help explain forms authentication in 2.0? Parsing Request.Headers.ToString() asp.net 2.0 connectoin string (hopefully last question) |
|||||||||||||||||||||||