Showing posts with label key. Show all posts
Showing posts with label key. Show all posts

Saturday, March 24, 2012

Passing variables between pages

Hi,

I'm trying to pass some variables that requires users to register. The first page, users key in the necessary information. After which, the 2nd page will load and display the infomation that the user had keyed-in previously, from this page the user can choose to confirm or cancel. On confirmation, the 3rd page will load and that should be when the information is inserted into the database. My problem is when it reaches the 3rd page, the values seem to be gone, as the page loads with an error stating something like my user_id is not present(being a primary key, it cant be null). In the 2nd page, when i was trying to show the info, i added some hidden inputs at the bottom, its something like


<input id="user_id" type="hidden" value="<%=user_id%>">

and so on, i was expecting these inputs to be passed over to the 3rd page, but it doesnt seem to be this way, anyone can help me on this?May be you can try to use session variable.

passing variables between web page events & httpmodules events

Use the item property on the httpcontext object. It's a dictionary object
which stores key/pair values but it is available every the httpcontext
object is available.

Regards

--

----
Got TidBits?
Get it here: www.networkip.net/tidbits
"shiv" <kadalli@dotnet.itags.org.hotmail.com> wrote in message
news:082a01c3b295$6d2db890$a501280a@dotnet.itags.org.phx.gbl...
> hi all,
> I need to access some variables which are generated in
> preRequestHandler Event in httpModule. I need these
> variables in Page ButtonControl Click event. Is that
> possible? I don't want to use session variables here. has
> anybody got some inputs here.
> Thanks in advance,
> regards
> shivThanks Alvin,
I too found out the same. You reaffirmed my findings!.
Thanks a millon!

regards
shiv
>--Original Message--
>Use the item property on the httpcontext object. It's a
dictionary object
>which stores key/pair values but it is available every
the httpcontext
>object is available.
>Regards
>--
>
>----
>Got TidBits?
>Get it here: www.networkip.net/tidbits
>"shiv" <kadalli@.hotmail.com> wrote in message
>news:082a01c3b295$6d2db890$a501280a@.phx.gbl...
>> hi all,
>>
>> I need to access some variables which are generated in
>> preRequestHandler Event in httpModule. I need these
>> variables in Page ButtonControl Click event. Is that
>> possible? I don't want to use session variables here.
has
>> anybody got some inputs here.
>> Thanks in advance,
>> regards
>> shiv
>>
>
>.