|
 |
aspx_beginners thread: Posting form variables/controls from one .aspx page to another .aspx page
Message #1 by rpunjaram@b... on Fri, 8 Mar 2002 01:17:54
|
|
We have difficulty to post the form variables from one .aspx page to
another .aspx page. Is there is any code sample which will demonstrat the
above problem.
When we tried using javascript form.submit() from one .aspx page to
another .aspx page, we are getting the following error on the second .aspx
page.
"The View State is invalid for this page and might be corrupted." we would
like to know what is the above error and what is the solution to resolve
the above problem.
Thanks & Regards,
Ramesh
Message #2 by "Douglas J. Badin" <DJBadin@m...> on Thu, 7 Mar 2002 21:03:23 -0500
|
|
The workaround for the ViewState problem would be to add
EnableViewStateMac="false" to the page attribute of the posted page.
<%@ Page EnableViewStateMac="false" %>
By Default, EnableViewStateMac is true for increased security.
The Message Authentication Check (MAC) key calculation includes the
hashcode of the page to determine if the view state of the page was
modified.
Doug
Message #3 by "lavergne" <g.lavergne@f...> on Fri, 8 Mar 2002 09:38:21
|
|
I've got the same difficulty. If you find a solution. Please help me.
Thanks & Regards,
lavergne guillaume
> We have difficulty to post the form variables from one .aspx page to
> another .aspx page. Is there is any code sample which will demonstrat
the
> above problem.
>
> When we tried using javascript form.submit() from one .aspx page to
> another .aspx page, we are getting the following error on the
second .aspx
> page.
> "The View State is invalid for this page and might be corrupted." we
would
> like to know what is the above error and what is the solution to resolve
> the above problem.
>
> Thanks & Regards,
>
> Ramesh
Message #4 by Elissa Setarehshenas <elissasetareh@y...> on Fri, 8 Mar 2002 06:18:05 -0800 (PST)
|
|
You should use .Net cookies to pass variables from one
page to the other. Here's what you need to do.
On Page 1
HttpCookie myCookie;
myCookie = Request.Cookies["CookieName"];
myCookie.Value = myPage1Variable.Text;
Response.Cookies.Add(CookieName);
On Page 2
HttpCookie myCookie;
myCookie = Request.Cookies["CookieName"];
myPage2Variable.Text = (myCookie.Value);
Hope this helps you
Elissa Setareh
--- lavergne <g.lavergne@f...> wrote:
> I've got the same difficulty. If you find a
> solution. Please help me.
>
> Thanks & Regards,
>
> lavergne guillaume
>
>
> > We have difficulty to post the form variables from
> one .aspx page to
> > another .aspx page. Is there is any code sample
> which will demonstrat
> the
> > above problem.
> >
> > When we tried using javascript form.submit() from
> one .aspx page to
> > another .aspx page, we are getting the following
> error on the
> second .aspx
> > page.
> > "The View State is invalid for this page and might
> be corrupted." we
> would
> > like to know what is the above error and what is
> the solution to resolve
> > the above problem.
> >
> > Thanks & Regards,
> >
> > Ramesh
$subst('Email.Unsub').
__________________________________________________
Do You Yahoo!?
Try FREE Yahoo! Mail - the world's greatest free email!
http://mail.yahoo.com/
Message #5 by "Punjaram, Ramesh (Exchange)" <rpunjaram@b...> on Fri, 8 Mar 2002 09:58:37 -0500
|
|
Thanks,
I helps.
Thanks Once again
Ramesh
-----Original Message-----
From: Douglas J. Badin [mailto:DJBadin@m...]
Sent: Thursday, March 07, 2002 9:03 PM
To: aspx_beginners
Subject: [aspx_beginners] RE: Posting form variables/controls from one
.aspx page to another .aspx page
The workaround for the ViewState problem would be to add
EnableViewStateMac="false" to the page attribute of the posted page.
<%@ Page EnableViewStateMac="false" %>
By Default, EnableViewStateMac is true for increased security.
The Message Authentication Check (MAC) key calculation includes the
hashcode of the page to determine if the view state of the page was
modified.
Doug
$subst('Email.Unsub').
**********************************************************************
Please be aware that, notwithstanding the fact that the person sending
this communication has an address in Bear Stearns' e-mail system, this
person is not an employee, agent or representative of Bear Stearns.
Accordingly, this person has no power or authority to represent, make
any recommendation, solicitation, offer or statements or disclose
information on behalf of or in any way bind Bear Stearns or any of its
affiliates.
**********************************************************************
Message #6 by "McCloy, Russell" <Russell.McCloy@B...> on Mon, 11 Mar 2002 09:27:48 +1100
|
|
Is using cookies the general concensus from everyone?
I am used to using the querystring but I hate it as it's messy!
What do you all think?
thanks
RuSs
-----Original Message-----
From: Elissa Setarehshenas [mailto:elissasetareh@y...]
Sent: Saturday, 9 March 2002 1:18 AM
To: aspx_beginners
Subject: [aspx_beginners] Re: Posting form variables/controls from one
.aspx page to another .aspx page
You should use .Net cookies to pass variables from one
page to the other. Here's what you need to do.
On Page 1
HttpCookie myCookie;
myCookie = Request.Cookies["CookieName"];
myCookie.Value = myPage1Variable.Text;
Response.Cookies.Add(CookieName);
On Page 2
HttpCookie myCookie;
myCookie = Request.Cookies["CookieName"];
myPage2Variable.Text = (myCookie.Value);
Hope this helps you
Elissa Setareh
--- lavergne <g.lavergne@f...> wrote:
> I've got the same difficulty. If you find a
> solution. Please help me.
>
> Thanks & Regards,
>
> lavergne guillaume
>
>
> > We have difficulty to post the form variables from
> one .aspx page to
> > another .aspx page. Is there is any code sample
> which will demonstrat
> the
> > above problem.
> >
> > When we tried using javascript form.submit() from
> one .aspx page to
> > another .aspx page, we are getting the following
> error on the
> second .aspx
> > page.
> > "The View State is invalid for this page and might
> be corrupted." we
> would
> > like to know what is the above error and what is
> the solution to resolve
> > the above problem.
> >
> > Thanks & Regards,
> >
> > Ramesh
$subst('Email.Unsub').
__________________________________________________
Do You Yahoo!?
Try FREE Yahoo! Mail - the world's greatest free email!
http://mail.yahoo.com/
$subst('Email.Unsub').
Message #7 by "McCloy, Russell" <Russell.McCloy@B...> on Mon, 11 Mar 2002 09:29:39 +1100
|
|
What about response.redirect("newPage.aspx?myVar=stuff")
??
RuSs
-----Original Message-----
From: lavergne [mailto:g.lavergne@f...]
Sent: Friday, 8 March 2002 8:38 PM
To: aspx_beginners
Subject: [aspx_beginners] Re: Posting form variables/controls from one
.aspx page to another .aspx page
I've got the same difficulty. If you find a solution. Please help me.
Thanks & Regards,
lavergne guillaume
> We have difficulty to post the form variables from one .aspx page to
> another .aspx page. Is there is any code sample which will demonstrat
the
> above problem.
>
> When we tried using javascript form.submit() from one .aspx page to
> another .aspx page, we are getting the following error on the
second .aspx
> page.
> "The View State is invalid for this page and might be corrupted." we
would
> like to know what is the above error and what is the solution to resolve
> the above problem.
>
> Thanks & Regards,
>
> Ramesh
$subst('Email.Unsub').
Message #8 by "Scott Worley" <worleys@h...> on Mon, 11 Mar 2002 18:51:51 -0800
|
|
Hi Russell,
I normally shy away from answering on the lists but it seems that you are
not getting many answers, so here are a couple for you, plus a link to a
rather nice example, by a good friend of mine.
If I understand your question, you want to access form variables from one
form in another, if so there are at least 4 ways I know of doing this, I
will list these below:
1. Use Session State to staore the values between the forms, for each user
session on the system, you can store either single values, or a component of
your own creation (I tend to use the latter suggestion), if you want a code
example, I can post one here, or send one to you.
2. Use query string, very messy and very prone to error, and most
importantly harder to understand when some else looks at the code. (I very
rarely reccommend this approach)
3. Cookies, nice, but I prefer not to use, also you can have issues with
browsers not supporting them.
4. Use the Context.Handler object (somewhat more advanced technique),
basically you can create an instance of the previous request, and type cast
it as the form you where using, this is a very elegant way of doing things,
and a great tutorial/example is available at:
http://www.aspalliance.com/kenc/passval.aspx
this example nicely demonstrates how to pass values from one for to another.
Much Kudos, to Ken Cox for it :)
As ever, if you want more information feel free to ask.
Repect & Honor
Scott Worley
Author of: Inside ASP.NET, New Riders Publishing, Nov 2001.
Working on: Commerce Server 2002 and .NET Unleashed, SAMS.
Doing Deep Exploration of the .NET Servers and integration with .NET
Framework.
----- Original Message -----
From: "McCloy, Russell" <Russell.McCloy@B...>
To: "aspx_beginners" <aspx_beginners@p...>
Sent: Sunday, March 10, 2002 2:27 PM
Subject: [aspx_beginners] Re: Posting form variables/controls from on e
.aspx page to another .aspx page
> Is using cookies the general concensus from everyone?
> I am used to using the querystring but I hate it as it's messy!
>
> What do you all think?
>
> thanks
>
> RuSs
>
>
> -----Original Message-----
> From: Elissa Setarehshenas [mailto:elissasetareh@y...]
> Sent: Saturday, 9 March 2002 1:18 AM
> To: aspx_beginners
> Subject: [aspx_beginners] Re: Posting form variables/controls from one
> .aspx page to another .aspx page
>
>
>
> You should use .Net cookies to pass variables from one
> page to the other. Here's what you need to do.
>
>
> On Page 1
> HttpCookie myCookie;
> myCookie = Request.Cookies["CookieName"];
> myCookie.Value = myPage1Variable.Text;
> Response.Cookies.Add(CookieName);
>
>
> On Page 2
>
> HttpCookie myCookie;
> myCookie = Request.Cookies["CookieName"];
> myPage2Variable.Text = (myCookie.Value);
>
> Hope this helps you
>
> Elissa Setareh
>
> --- lavergne <g.lavergne@f...> wrote:
> > I've got the same difficulty. If you find a
> > solution. Please help me.
> >
> > Thanks & Regards,
> >
> > lavergne guillaume
> >
> >
> > > We have difficulty to post the form variables from
> > one .aspx page to
> > > another .aspx page. Is there is any code sample
> > which will demonstrat
> > the
> > > above problem.
> > >
> > > When we tried using javascript form.submit() from
> > one .aspx page to
> > > another .aspx page, we are getting the following
> > error on the
> > second .aspx
> > > page.
> > > "The View State is invalid for this page and might
> > be corrupted." we
> > would
> > > like to know what is the above error and what is
> > the solution to resolve
> > > the above problem.
> > >
> > > Thanks & Regards,
> > >
> > > Ramesh
> $subst('Email.Unsub').
>
>
> __________________________________________________
> Do You Yahoo!?
> Try FREE Yahoo! Mail - the world's greatest free email!
> http://mail.yahoo.com/
>
> $subst('Email.Unsub').
>
$subst('Email.Unsub').
>
Message #9 by "McCloy, Russell" <Russell.McCloy@B...> on Mon, 11 Mar 2002 14:11:18 +1100
|
|
Thanks for this Scott.
I have used all these techniques apart from the last one.
I will look at the example and see how I go.
Thanks heaps for your help.
RuSs
-----Original Message-----
From: Scott Worley [mailto:worleys@h...]
Sent: Tuesday, 12 March 2002 1:52 PM
To: aspx_beginners
Subject: [aspx_beginners] Re: Posting form variables/controls from on e
.aspx page to another .aspx page
Hi Russell,
I normally shy away from answering on the lists but it seems that you are
not getting many answers, so here are a couple for you, plus a link to a
rather nice example, by a good friend of mine.
If I understand your question, you want to access form variables from one
form in another, if so there are at least 4 ways I know of doing this, I
will list these below:
1. Use Session State to staore the values between the forms, for each user
session on the system, you can store either single values, or a component of
your own creation (I tend to use the latter suggestion), if you want a code
example, I can post one here, or send one to you.
2. Use query string, very messy and very prone to error, and most
importantly harder to understand when some else looks at the code. (I very
rarely reccommend this approach)
3. Cookies, nice, but I prefer not to use, also you can have issues with
browsers not supporting them.
4. Use the Context.Handler object (somewhat more advanced technique),
basically you can create an instance of the previous request, and type cast
it as the form you where using, this is a very elegant way of doing things,
and a great tutorial/example is available at:
http://www.aspalliance.com/kenc/passval.aspx
this example nicely demonstrates how to pass values from one for to another.
Much Kudos, to Ken Cox for it :)
As ever, if you want more information feel free to ask.
Repect & Honor
Scott Worley
Author of: Inside ASP.NET, New Riders Publishing, Nov 2001.
Working on: Commerce Server 2002 and .NET Unleashed, SAMS.
Doing Deep Exploration of the .NET Servers and integration with .NET
Framework.
----- Original Message -----
From: "McCloy, Russell" <Russell.McCloy@B...>
To: "aspx_beginners" <aspx_beginners@p...>
Sent: Sunday, March 10, 2002 2:27 PM
Subject: [aspx_beginners] Re: Posting form variables/controls from on e
.aspx page to another .aspx page
> Is using cookies the general concensus from everyone?
> I am used to using the querystring but I hate it as it's messy!
>
> What do you all think?
>
> thanks
>
> RuSs
>
>
> -----Original Message-----
> From: Elissa Setarehshenas [mailto:elissasetareh@y...]
> Sent: Saturday, 9 March 2002 1:18 AM
> To: aspx_beginners
> Subject: [aspx_beginners] Re: Posting form variables/controls from one
> .aspx page to another .aspx page
>
>
>
> You should use .Net cookies to pass variables from one
> page to the other. Here's what you need to do.
>
>
> On Page 1
> HttpCookie myCookie;
> myCookie = Request.Cookies["CookieName"];
> myCookie.Value = myPage1Variable.Text;
> Response.Cookies.Add(CookieName);
>
>
> On Page 2
>
> HttpCookie myCookie;
> myCookie = Request.Cookies["CookieName"];
> myPage2Variable.Text = (myCookie.Value);
>
> Hope this helps you
>
> Elissa Setareh
>
> --- lavergne <g.lavergne@f...> wrote:
> > I've got the same difficulty. If you find a
> > solution. Please help me.
> >
> > Thanks & Regards,
> >
> > lavergne guillaume
> >
> >
> > > We have difficulty to post the form variables from
> > one .aspx page to
> > > another .aspx page. Is there is any code sample
> > which will demonstrat
> > the
> > > above problem.
> > >
> > > When we tried using javascript form.submit() from
> > one .aspx page to
> > > another .aspx page, we are getting the following
> > error on the
> > second .aspx
> > > page.
> > > "The View State is invalid for this page and might
> > be corrupted." we
> > would
> > > like to know what is the above error and what is
> > the solution to resolve
> > > the above problem.
> > >
> > > Thanks & Regards,
> > >
> > > Ramesh
> $subst('Email.Unsub').
>
>
> __________________________________________________
> Do You Yahoo!?
> Try FREE Yahoo! Mail - the world's greatest free email!
> http://mail.yahoo.com/
>
> $subst('Email.Unsub').
>
$subst('Email.Unsub').
>
$subst('Email.Unsub').
Message #10 by "Scott Worley" <worleys@h...> on Mon, 11 Mar 2002 18:58:28 -0800
|
|
Any time, ;)
Scott Worley
Author of: Inside ASP.NET, New Riders Publishing, Nov 2001.
Working on: Commerce Server 2002 and .NET Unleashed, SAMS.
Doing Deep Exploration of the .NET servers and integration with .NET
Framework.
----- Original Message -----
From: "McCloy, Russell" <Russell.McCloy@B...>
To: "aspx_beginners" <aspx_beginners@p...>
Sent: Sunday, March 10, 2002 7:11 PM
Subject: [aspx_beginners] Re: Posting form variables/controls from on e
.aspx page to another .aspx page
> Thanks for this Scott.
> I have used all these techniques apart from the last one.
> I will look at the example and see how I go.
>
> Thanks heaps for your help.
>
> RuSs
>
> -----Original Message-----
> From: Scott Worley [mailto:worleys@h...]
> Sent: Tuesday, 12 March 2002 1:52 PM
> To: aspx_beginners
> Subject: [aspx_beginners] Re: Posting form variables/controls from on e
> .aspx page to another .aspx page
>
>
> Hi Russell,
>
> I normally shy away from answering on the lists but it seems that you are
> not getting many answers, so here are a couple for you, plus a link to a
> rather nice example, by a good friend of mine.
>
> If I understand your question, you want to access form variables from one
> form in another, if so there are at least 4 ways I know of doing this, I
> will list these below:
>
> 1. Use Session State to staore the values between the forms, for each user
> session on the system, you can store either single values, or a component
of
> your own creation (I tend to use the latter suggestion), if you want a
code
> example, I can post one here, or send one to you.
>
> 2. Use query string, very messy and very prone to error, and most
> importantly harder to understand when some else looks at the code. (I very
> rarely reccommend this approach)
>
> 3. Cookies, nice, but I prefer not to use, also you can have issues with
> browsers not supporting them.
>
> 4. Use the Context.Handler object (somewhat more advanced technique),
> basically you can create an instance of the previous request, and type
cast
> it as the form you where using, this is a very elegant way of doing
things,
> and a great tutorial/example is available at:
>
> http://www.aspalliance.com/kenc/passval.aspx
>
> this example nicely demonstrates how to pass values from one for to
another.
>
> Much Kudos, to Ken Cox for it :)
>
> As ever, if you want more information feel free to ask.
>
> Repect & Honor
>
>
> Scott Worley
> Author of: Inside ASP.NET, New Riders Publishing, Nov 2001.
> Working on: Commerce Server 2002 and .NET Unleashed, SAMS.
> Doing Deep Exploration of the .NET Servers and integration with .NET
> Framework.
>
>
>
>
>
> ----- Original Message -----
> From: "McCloy, Russell" <Russell.McCloy@B...>
> To: "aspx_beginners" <aspx_beginners@p...>
> Sent: Sunday, March 10, 2002 2:27 PM
> Subject: [aspx_beginners] Re: Posting form variables/controls from on e
> .aspx page to another .aspx page
>
>
> > Is using cookies the general concensus from everyone?
> > I am used to using the querystring but I hate it as it's messy!
> >
> > What do you all think?
> >
> > thanks
> >
> > RuSs
> >
> >
> > -----Original Message-----
> > From: Elissa Setarehshenas [mailto:elissasetareh@y...]
> > Sent: Saturday, 9 March 2002 1:18 AM
> > To: aspx_beginners
> > Subject: [aspx_beginners] Re: Posting form variables/controls from one
> > .aspx page to another .aspx page
> >
> >
> >
> > You should use .Net cookies to pass variables from one
> > page to the other. Here's what you need to do.
> >
> >
> > On Page 1
> > HttpCookie myCookie;
> > myCookie = Request.Cookies["CookieName"];
> > myCookie.Value = myPage1Variable.Text;
> > Response.Cookies.Add(CookieName);
> >
> >
> > On Page 2
> >
> > HttpCookie myCookie;
> > myCookie = Request.Cookies["CookieName"];
> > myPage2Variable.Text = (myCookie.Value);
> >
> > Hope this helps you
> >
> > Elissa Setareh
> >
> > --- lavergne <g.lavergne@f...> wrote:
> > > I've got the same difficulty. If you find a
> > > solution. Please help me.
> > >
> > > Thanks & Regards,
> > >
> > > lavergne guillaume
> > >
> > >
> > > > We have difficulty to post the form variables from
> > > one .aspx page to
> > > > another .aspx page. Is there is any code sample
> > > which will demonstrat
> > > the
> > > > above problem.
> > > >
> > > > When we tried using javascript form.submit() from
> > > one .aspx page to
> > > > another .aspx page, we are getting the following
> > > error on the
> > > second .aspx
> > > > page.
> > > > "The View State is invalid for this page and might
> > > be corrupted." we
> > > would
> > > > like to know what is the above error and what is
> > > the solution to resolve
> > > > the above problem.
> > > >
> > > > Thanks & Regards,
> > > >
> > > > Ramesh
> > $subst('Email.Unsub').
> >
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Try FREE Yahoo! Mail - the world's greatest free email!
> > http://mail.yahoo.com/
> >
> > $subst('Email.Unsub').
> >
> $subst('Email.Unsub').
> >
>
> $subst('Email.Unsub').
>
$subst('Email.Unsub').
>
Message #11 by "Rob Taylor" <taylo@g...> on Sun, 10 Mar 2002 22:33:19 -0500
|
|
I'm very interested in what kind of an application you are developing.
I cannot think of too many instances where you want to post to the next
page. That kind of defeats the purpose of using ASP.NET. If you are
going through a registration process or cart process and you want to pass
values from page to page to page and store them in hidden variables you
might as well just use classic ASP because you are not accomplishing
anything
with ASP.NET. You are actually making it harder.
I am not doubting you need to so this. I am just curious. I look forward
to hearing back from you.
Thanks,
Rob
-----Original Message-----
From: Scott Worley [mailto:worleys@h...]
Sent: Monday, March 11, 2002 9:52 PM
To: aspx_beginners
Subject: [aspx_beginners] Re: Posting form variables/controls from on e
.aspx page to another .aspx page
Hi Russell,
I normally shy away from answering on the lists but it seems that you are
not getting many answers, so here are a couple for you, plus a link to a
rather nice example, by a good friend of mine.
If I understand your question, you want to access form variables from one
form in another, if so there are at least 4 ways I know of doing this, I
will list these below:
1. Use Session State to staore the values between the forms, for each user
session on the system, you can store either single values, or a component of
your own creation (I tend to use the latter suggestion), if you want a code
example, I can post one here, or send one to you.
2. Use query string, very messy and very prone to error, and most
importantly harder to understand when some else looks at the code. (I very
rarely reccommend this approach)
3. Cookies, nice, but I prefer not to use, also you can have issues with
browsers not supporting them.
4. Use the Context.Handler object (somewhat more advanced technique),
basically you can create an instance of the previous request, and type cast
it as the form you where using, this is a very elegant way of doing things,
and a great tutorial/example is available at:
http://www.aspalliance.com/kenc/passval.aspx
this example nicely demonstrates how to pass values from one for to another.
Much Kudos, to Ken Cox for it :)
As ever, if you want more information feel free to ask.
Repect & Honor
Scott Worley
Author of: Inside ASP.NET, New Riders Publishing, Nov 2001.
Working on: Commerce Server 2002 and .NET Unleashed, SAMS.
Doing Deep Exploration of the .NET Servers and integration with .NET
Framework.
----- Original Message -----
From: "McCloy, Russell" <Russell.McCloy@B...>
To: "aspx_beginners" <aspx_beginners@p...>
Sent: Sunday, March 10, 2002 2:27 PM
Subject: [aspx_beginners] Re: Posting form variables/controls from on e
.aspx page to another .aspx page
> Is using cookies the general concensus from everyone?
> I am used to using the querystring but I hate it as it's messy!
>
> What do you all think?
>
> thanks
>
> RuSs
>
>
> -----Original Message-----
> From: Elissa Setarehshenas [mailto:elissasetareh@y...]
> Sent: Saturday, 9 March 2002 1:18 AM
> To: aspx_beginners
> Subject: [aspx_beginners] Re: Posting form variables/controls from one
> .aspx page to another .aspx page
>
>
>
> You should use .Net cookies to pass variables from one
> page to the other. Here's what you need to do.
>
>
> On Page 1
> HttpCookie myCookie;
> myCookie = Request.Cookies["CookieName"];
> myCookie.Value = myPage1Variable.Text;
> Response.Cookies.Add(CookieName);
>
>
> On Page 2
>
> HttpCookie myCookie;
> myCookie = Request.Cookies["CookieName"];
> myPage2Variable.Text = (myCookie.Value);
>
> Hope this helps you
>
> Elissa Setareh
>
> --- lavergne <g.lavergne@f...> wrote:
> > I've got the same difficulty. If you find a
> > solution. Please help me.
> >
> > Thanks & Regards,
> >
> > lavergne guillaume
> >
> >
> > > We have difficulty to post the form variables from
> > one .aspx page to
> > > another .aspx page. Is there is any code sample
> > which will demonstrat
> > the
> > > above problem.
> > >
> > > When we tried using javascript form.submit() from
> > one .aspx page to
> > > another .aspx page, we are getting the following
> > error on the
> > second .aspx
> > > page.
> > > "The View State is invalid for this page and might
> > be corrupted." we
> > would
> > > like to know what is the above error and what is
> > the solution to resolve
> > > the above problem.
> > >
> > > Thanks & Regards,
> > >
> > > Ramesh
> $subst('Email.Unsub').
>
>
> __________________________________________________
> Do You Yahoo!?
> Try FREE Yahoo! Mail - the world's greatest free email!
> http://mail.yahoo.com/
>
> $subst('Email.Unsub').
>
$subst('Email.Unsub').
>
$subst('Email.Unsub').
Message #12 by "Scott Worley" <worleys@h...> on Mon, 11 Mar 2002 19:21:53 -0800
|
|
Hi Rob,
I know the question was not for me directly, but I will give you some
examples where it is of use.
In some of the larger enterprise applications I work with, we have some
wizard like process (directly related to the companies business workflow
processes), that can span quite a few pages, depending on various issues.
An example of which is a dynamic survey system where depending on previous
answers, user profile information and question bias, different pages, with
different questions are relayed to a user.
Another example is that of a larger MS application, Commerce Server 2002,
this product uses session state to maintain key information between pages
for each users session, and no, its not just basket information.
I also use browser side state management aswell, (IE feature, little known
but very usefull for complex UI work)
In the end it depends on your need, and the level of knowledge you have, yes
of course you can create a component, and create a new instance per page and
get its data (from a cache if need be).
Scott Worley
Author of: Inside ASP.NET, New Riders Publishing, Nov 2001.
Working on: Commerce Server 2002 and .NET Unleashed, SAMS.
Doing Deep Exploration of the .NET servers and integration with .NET
Framework.
----- Original Message -----
From: "Rob Taylor" <taylo@g...>
To: "aspx_beginners" <aspx_beginners@p...>
Sent: Sunday, March 10, 2002 7:33 PM
Subject: [aspx_beginners] Re: Posting form variables/controls from on e
.aspx page to another .aspx page
> I'm very interested in what kind of an application you are developing.
> I cannot think of too many instances where you want to post to the next
> page. That kind of defeats the purpose of using ASP.NET. If you are
> going through a registration process or cart process and you want to pass
> values from page to page to page and store them in hidden variables you
> might as well just use classic ASP because you are not accomplishing
> anything
> with ASP.NET. You are actually making it harder.
>
> I am not doubting you need to so this. I am just curious. I look forward
> to hearing back from you.
>
> Thanks,
>
>
> Rob
>
>
> -----Original Message-----
> From: Scott Worley [mailto:worleys@h...]
> Sent: Monday, March 11, 2002 9:52 PM
> To: aspx_beginners
> Subject: [aspx_beginners] Re: Posting form variables/controls from on e
> .aspx page to another .aspx page
>
>
> Hi Russell,
>
> I normally shy away from answering on the lists but it seems that you are
> not getting many answers, so here are a couple for you, plus a link to a
> rather nice example, by a good friend of mine.
>
> If I understand your question, you want to access form variables from one
> form in another, if so there are at least 4 ways I know of doing this, I
> will list these below:
>
> 1. Use Session State to staore the values between the forms, for each user
> session on the system, you can store either single values, or a component
of
> your own creation (I tend to use the latter suggestion), if you want a
code
> example, I can post one here, or send one to you.
>
> 2. Use query string, very messy and very prone to error, and most
> importantly harder to understand when some else looks at the code. (I very
> rarely reccommend this approach)
>
> 3. Cookies, nice, but I prefer not to use, also you can have issues with
> browsers not supporting them.
>
> 4. Use the Context.Handler object (somewhat more advanced technique),
> basically you can create an instance of the previous request, and type
cast
> it as the form you where using, this is a very elegant way of doing
things,
> and a great tutorial/example is available at:
>
> http://www.aspalliance.com/kenc/passval.aspx
>
> this example nicely demonstrates how to pass values from one for to
another.
>
> Much Kudos, to Ken Cox for it :)
>
> As ever, if you want more information feel free to ask.
>
> Repect & Honor
>
>
> Scott Worley
> Author of: Inside ASP.NET, New Riders Publishing, Nov 2001.
> Working on: Commerce Server 2002 and .NET Unleashed, SAMS.
> Doing Deep Exploration of the .NET Servers and integration with .NET
> Framework.
>
>
>
>
>
> ----- Original Message -----
> From: "McCloy, Russell" <Russell.McCloy@B...>
> To: "aspx_beginners" <aspx_beginners@p...>
> Sent: Sunday, March 10, 2002 2:27 PM
> Subject: [aspx_beginners] Re: Posting form variables/controls from on e
> .aspx page to another .aspx page
>
>
> > Is using cookies the general concensus from everyone?
> > I am used to using the querystring but I hate it as it's messy!
> >
> > What do you all think?
> >
> > thanks
> >
> > RuSs
> >
> >
> > -----Original Message-----
> > From: Elissa Setarehshenas [mailto:elissasetareh@y...]
> > Sent: Saturday, 9 March 2002 1:18 AM
> > To: aspx_beginners
> > Subject: [aspx_beginners] Re: Posting form variables/controls from one
> > .aspx page to another .aspx page
> >
> >
> >
> > You should use .Net cookies to pass variables from one
> > page to the other. Here's what you need to do.
> >
> >
> > On Page 1
> > HttpCookie myCookie;
> > myCookie = Request.Cookies["CookieName"];
> > myCookie.Value = myPage1Variable.Text;
> > Response.Cookies.Add(CookieName);
> >
> >
> > On Page 2
> >
> > HttpCookie myCookie;
> > myCookie = Request.Cookies["CookieName"];
> > myPage2Variable.Text = (myCookie.Value);
> >
> > Hope this helps you
> >
> > Elissa Setareh
> >
> > --- lavergne <g.lavergne@f...> wrote:
> > > I've got the same difficulty. If you find a
> > > solution. Please help me.
> > >
> > > Thanks & Regards,
> > >
> > > lavergne guillaume
> > >
> > >
> > > > We have difficulty to post the form variables from
> > > one .aspx page to
> > > > another .aspx page. Is there is any code sample
> > > which will demonstrat
> > > the
> > > > above problem.
> > > >
> > > > When we tried using javascript form.submit() from
> > > one .aspx page to
> > > > another .aspx page, we are getting the following
> > > error on the
> > > second .aspx
> > > > page.
> > > > "The View State is invalid for this page and might
> > > be corrupted." we
> > > would
> > > > like to know what is the above error and what is
> > > the solution to resolve
> > > > the above problem.
> > > >
> > > > Thanks & Regards,
> > > >
> > > > Ramesh
> > $subst('Email.Unsub').
> >
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Try FREE Yahoo! Mail - the world's greatest free email!
> > http://mail.yahoo.com/
> >
> > $subst('Email.Unsub').
> >
> $subst('Email.Unsub').
> >
>
> $subst('Email.Unsub').
>
>
$subst('Email.Unsub').
>
Message #13 by "Rob Taylor" <taylo@g...> on Sun, 10 Mar 2002 23:15:32 -0500
|
|
These are some very good examples of when you would do this.
Thanks for sharing this with me.
I am just curious if his application is that involved.
Thanks,
Rob
-----Original Message-----
From: Scott Worley [mailto:worleys@h...]
Sent: Monday, March 11, 2002 10:22 PM
To: aspx_beginners
Subject: [aspx_beginners] Re: Posting form variables/controls from on e
.aspx page to another .aspx page
Hi Rob,
I know the question was not for me directly, but I will give you some
examples where it is of use.
In some of the larger enterprise applications I work with, we have some
wizard like process (directly related to the companies business workflow
processes), that can span quite a few pages, depending on various issues.
An example of which is a dynamic survey system where depending on previous
answers, user profile information and question bias, different pages, with
different questions are relayed to a user.
Another example is that of a larger MS application, Commerce Server 2002,
this product uses session state to maintain key information between pages
for each users session, and no, its not just basket information.
I also use browser side state management aswell, (IE feature, little known
but very usefull for complex UI work)
In the end it depends on your need, and the level of knowledge you have, yes
of course you can create a component, and create a new instance per page and
get its data (from a cache if need be).
Scott Worley
Author of: Inside ASP.NET, New Riders Publishing, Nov 2001.
Working on: Commerce Server 2002 and .NET Unleashed, SAMS.
Doing Deep Exploration of the .NET servers and integration with .NET
Framework.
----- Original Message -----
From: "Rob Taylor" <taylo@g...>
To: "aspx_beginners" <aspx_beginners@p...>
Sent: Sunday, March 10, 2002 7:33 PM
Subject: [aspx_beginners] Re: Posting form variables/controls from on e
.aspx page to another .aspx page
> I'm very interested in what kind of an application you are developing.
> I cannot think of too many instances where you want to post to the next
> page. That kind of defeats the purpose of using ASP.NET. If you are
> going through a registration process or cart process and you want to pass
> values from page to page to page and store them in hidden variables you
> might as well just use classic ASP because you are not accomplishing
> anything
> with ASP.NET. You are actually making it harder.
>
> I am not doubting you need to so this. I am just curious. I look forward
> to hearing back from you.
>
> Thanks,
>
>
> Rob
>
>
> -----Original Message-----
> From: Scott Worley [mailto:worleys@h...]
> Sent: Monday, March 11, 2002 9:52 PM
> To: aspx_beginners
> Subject: [aspx_beginners] Re: Posting form variables/controls from on e
> .aspx page to another .aspx page
>
>
> Hi Russell,
>
> I normally shy away from answering on the lists but it seems that you are
> not getting many answers, so here are a couple for you, plus a link to a
> rather nice example, by a good friend of mine.
>
> If I understand your question, you want to access form variables from one
> form in another, if so there are at least 4 ways I know of doing this, I
> will list these below:
>
> 1. Use Session State to staore the values between the forms, for each user
> session on the system, you can store either single values, or a component
of
> your own creation (I tend to use the latter suggestion), if you want a
code
> example, I can post one here, or send one to you.
>
> 2. Use query string, very messy and very prone to error, and most
> importantly harder to understand when some else looks at the code. (I very
> rarely reccommend this approach)
>
> 3. Cookies, nice, but I prefer not to use, also you can have issues with
> browsers not supporting them.
>
> 4. Use the Context.Handler object (somewhat more advanced technique),
> basically you can create an instance of the previous request, and type
cast
> it as the form you where using, this is a very elegant way of doing
things,
> and a great tutorial/example is available at:
>
> http://www.aspalliance.com/kenc/passval.aspx
>
> this example nicely demonstrates how to pass values from one for to
another.
>
> Much Kudos, to Ken Cox for it :)
>
> As ever, if you want more information feel free to ask.
>
> Repect & Honor
>
>
> Scott Worley
> Author of: Inside ASP.NET, New Riders Publishing, Nov 2001.
> Working on: Commerce Server 2002 and .NET Unleashed, SAMS.
> Doing Deep Exploration of the .NET Servers and integration with .NET
> Framework.
>
>
>
>
>
> ----- Original Message -----
> From: "McCloy, Russell" <Russell.McCloy@B...>
> To: "aspx_beginners" <aspx_beginners@p...>
> Sent: Sunday, March 10, 2002 2:27 PM
> Subject: [aspx_beginners] Re: Posting form variables/controls from on e
> .aspx page to another .aspx page
>
>
> > Is using cookies the general concensus from everyone?
> > I am used to using the querystring but I hate it as it's messy!
> >
> > What do you all think?
> >
> > thanks
> >
> > RuSs
> >
> >
> > -----Original Message-----
> > From: Elissa Setarehshenas [mailto:elissasetareh@y...]
> > Sent: Saturday, 9 March 2002 1:18 AM
> > To: aspx_beginners
> > Subject: [aspx_beginners] Re: Posting form variables/controls from one
> > .aspx page to another .aspx page
> >
> >
> >
> > You should use .Net cookies to pass variables from one
> > page to the other. Here's what you need to do.
> >
> >
> > On Page 1
> > HttpCookie myCookie;
> > myCookie = Request.Cookies["CookieName"];
> > myCookie.Value = myPage1Variable.Text;
> > Response.Cookies.Add(CookieName);
> >
> >
> > On Page 2
> >
> > HttpCookie myCookie;
> > myCookie = Request.Cookies["CookieName"];
> > myPage2Variable.Text = (myCookie.Value);
> >
> > Hope this helps you
> >
> > Elissa Setareh
> >
> > --- lavergne <g.lavergne@f...> wrote:
> > > I've got the same difficulty. If you find a
> > > solution. Please help me.
> > >
> > > Thanks & Regards,
> > >
> > > lavergne guillaume
> > >
> > >
> > > > We have difficulty to post the form variables from
> > > one .aspx page to
> > > > another .aspx page. Is there is any code sample
> > > which will demonstrat
> > > the
> > > > above problem.
> > > >
> > > > When we tried using javascript form.submit() from
> > > one .aspx page to
> > > > another .aspx page, we are getting the following
> > > error on the
> > > second .aspx
> > > > page.
> > > > "The View State is invalid for this page and might
> > > be corrupted." we
> > > would
> > > > like to know what is the above error and what is
> > > the solution to resolve
> > > > the above problem.
> > > >
> > > > Thanks & Regards,
> > > >
> > > > Ramesh
> > $subst('Email.Unsub').
> >
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Try FREE Yahoo! Mail - the world's greatest free email!
> > http://mail.yahoo.com/
> >
> > $subst('Email.Unsub').
> >
> $subst('Email.Unsub').
> >
>
> $subst('Email.Unsub').
>
>
$subst('Email.Unsub').
>
$subst('Email.Unsub').
Message #14 by "McCloy, Russell" <Russell.McCloy@B...> on Mon, 11 Mar 2002 23:08:50 +1100
|
|
hi Rob,
I'm actually not building an app. that needs to do this.
I was just pondering whether ASP.NET has any new techniques instead
of the querystring.
What would you do, for example if you have a logon page that requires a user
to
enter their username and password. Once these have been validated against a
database then
you want to redirect to a welcome page that says, for example, welcome -
UserNAME
where username is the username from the logon page.
I suppose you could use session variables to store the username.
You could use the querystring.
What would you do?
look forward to your reply and any others.
Thanks
RuSs
-----Original Message-----
From: Rob Taylor [mailto:taylo@g...]
Sent: Monday, 11 March 2002 2:33 PM
To: aspx_beginners
Subject: [aspx_beginners] Re: Posting form variables/controls from on e
.aspx page to another .aspx page
I'm very interested in what kind of an application you are developing.
I cannot think of too many instances where you want to post to the next
page. That kind of defeats the purpose of using ASP.NET. If you are
going through a registration process or cart process and you want to pass
values from page to page to page and store them in hidden variables you
might as well just use classic ASP because you are not accomplishing
anything
with ASP.NET. You are actually making it harder.
I am not doubting you need to so this. I am just curious. I look forward
to hearing back from you.
Thanks,
Rob
-----Original Message-----
From: Scott Worley [mailto:worleys@h...]
Sent: Monday, March 11, 2002 9:52 PM
To: aspx_beginners
Subject: [aspx_beginners] Re: Posting form variables/controls from on e
.aspx page to another .aspx page
Hi Russell,
I normally shy away from answering on the lists but it seems that you are
not getting many answers, so here are a couple for you, plus a link to a
rather nice example, by a good friend of mine.
If I understand your question, you want to access form variables from one
form in another, if so there are at least 4 ways I know of doing this, I
will list these below:
1. Use Session State to staore the values between the forms, for each user
session on the system, you can store either single values, or a component of
your own creation (I tend to use the latter suggestion), if you want a code
example, I can post one here, or send one to you.
2. Use query string, very messy and very prone to error, and most
importantly harder to understand when some else looks at the code. (I very
rarely reccommend this approach)
3. Cookies, nice, but I prefer not to use, also you can have issues with
browsers not supporting them.
4. Use the Context.Handler object (somewhat more advanced technique),
basically you can create an instance of the previous request, and type cast
it as the form you where using, this is a very elegant way of doing things,
and a great tutorial/example is available at:
http://www.aspalliance.com/kenc/passval.aspx
this example nicely demonstrates how to pass values from one for to another.
Much Kudos, to Ken Cox for it :)
As ever, if you want more information feel free to ask.
Repect & Honor
Scott Worley
Author of: Inside ASP.NET, New Riders Publishing, Nov 2001.
Working on: Commerce Server 2002 and .NET Unleashed, SAMS.
Doing Deep Exploration of the .NET Servers and integration with .NET
Framework.
----- Original Message -----
From: "McCloy, Russell" <Russell.McCloy@B...>
To: "aspx_beginners" <aspx_beginners@p...>
Sent: Sunday, March 10, 2002 2:27 PM
Subject: [aspx_beginners] Re: Posting form variables/controls from on e
.aspx page to another .aspx page
> Is using cookies the general concensus from everyone?
> I am used to using the querystring but I hate it as it's messy!
>
> What do you all think?
>
> thanks
>
> RuSs
>
>
> -----Original Message-----
> From: Elissa Setarehshenas [mailto:elissasetareh@y...]
> Sent: Saturday, 9 March 2002 1:18 AM
> To: aspx_beginners
> Subject: [aspx_beginners] Re: Posting form variables/controls from one
> .aspx page to another .aspx page
>
>
>
> You should use .Net cookies to pass variables from one
> page to the other. Here's what you need to do.
>
>
> On Page 1
> HttpCookie myCookie;
> myCookie = Request.Cookies["CookieName"];
> myCookie.Value = myPage1Variable.Text;
> Response.Cookies.Add(CookieName);
>
>
> On Page 2
>
> HttpCookie myCookie;
> myCookie = Request.Cookies["CookieName"];
> myPage2Variable.Text = (myCookie.Value);
>
> Hope this helps you
>
> Elissa Setareh
>
> --- lavergne <g.lavergne@f...> wrote:
> > I've got the same difficulty. If you find a
> > solution. Please help me.
> >
> > Thanks & Regards,
> >
> > lavergne guillaume
> >
> >
> > > We have difficulty to post the form variables from
> > one .aspx page to
> > > another .aspx page. Is there is any code sample
> > which will demonstrat
> > the
> > > above problem.
> > >
> > > When we tried using javascript form.submit() from
> > one .aspx page to
> > > another .aspx page, we are getting the following
> > error on the
> > second .aspx
> > > page.
> > > "The View State is invalid for this page and might
> > be corrupted." we
> > would
> > > like to know what is the above error and what is
> > the solution to resolve
> > > the above problem.
> > >
> > > Thanks & Regards,
> > >
> > > Ramesh
> $subst('Email.Unsub').
>
>
> __________________________________________________
> Do You Yahoo!?
> Try FREE Yahoo! Mail - the world's greatest free email!
> http://mail.yahoo.com/
>
> $subst('Email.Unsub').
>
$subst('Email.Unsub').
>
$subst('Email.Unsub').
$subst('Email.Unsub').
Message #15 by "dwarakanath h" <madivi2002@y...> on Wed, 27 Mar 2002 16:50:37
|
|
Hi Scott
Which one of these method u mentioned is the best (based on performance)
Thanks
Dwarka
> Hi Russell,
>
> I normally shy away from answering on the lists but it seems that you are
> not getting many answers, so here are a couple for you, plus a link to a
> rather nice example, by a good friend of mine.
>
> If I understand your question, you want to access form variables from one
> form in another, if so there are at least 4 ways I know of doing this, I
> will list these below:
>
> 1. Use Session State to staore the values between the forms, for each
user
> session on the system, you can store either single values, or a
component of
> your own creation (I tend to use the latter suggestion), if you want a
code
> example, I can post one here, or send one to you.
>
> 2. Use query string, very messy and very prone to error, and most
> importantly harder to understand when some else looks at the code. (I
very
> rarely reccommend this approach)
>
> 3. Cookies, nice, but I prefer not to use, also you can have issues with
> browsers not supporting them.
>
> 4. Use the Context.Handler object (somewhat more advanced technique),
> basically you can create an instance of the previous request, and type
cast
> it as the form you where using, this is a very elegant way of doing
things,
> and a great tutorial/example is available at:
>
> http://www.aspalliance.com/kenc/passval.aspx
>
> this example nicely demonstrates how to pass values from one for to
another.
>
> Much Kudos, to Ken Cox for it :)
>
> As ever, if you want more information feel free to ask.
>
> Repect & Honor
>
>
> Scott Worley
> Author of: Inside ASP.NET, New Riders Publishing, Nov 2001.
> Working on: Commerce Server 2002 and .NET Unleashed, SAMS.
> Doing Deep Exploration of the .NET Servers and integration with .NET
> Framework.
>
>
>
>
>
|
|
 |