|
 |
aspx_beginners thread: Multi-Page Web Forms
Message #1 by "John Jerles" <johnjerles@h...> on Fri, 7 Dec 2001 09:13:34
|
|
Hello All,
I have been trying to figure out if it is possible to create a multi-
page web form in asp.net with server-side validation.
The problem is this: I have a 4 page form. I want the user to answer
the form with server-side validation (i.e. runat-server and
<asp:requiredfieldvalidator> etc...) but I am unable to get the validation
to work without setting the <form> attribute 'runat' to 'server'.
What happens is the form does validate itself, but it won't go to the
page defined by the 'action' attribute when it is done. I can force it to
go to the next page by checking the 'Page.Isvalid' value with
a 'response.redirect', but the value of the fields entered don't go along
with it. At least not in the normal way of the 'Post' method.
Right now I am doing a workaround that builds a 'Get' style string and
passes the information that way, but it seems a little odd to me that
Microsoft would give you all the functionality of the validation tools,
but no way to exit the form and go to another form page with the data once
it was validated.
Any help would, as always, be greatly apreciated.
Thank you,
John Jerles
Message #2 by Elissa Setarehshenas <elissasetareh@y...> on Fri, 7 Dec 2001 06:03:41 -0800 (PST)
|
|
Dear John,
Did you try using cookies? That's pretty much the
only way I've found to pass variables from one page to
another. Put it in a cookies and unpack the cookie on
the next page.
Hope this helps,
Elissa Setareh
--- John Jerles <johnjerles@h...> wrote:
> Hello All,
>
> I have been trying to figure out if it is possible
> to create a multi-
> page web form in asp.net with server-side
> validation.
>
> The problem is this: I have a 4 page form. I
> want the user to answer
> the form with server-side validation (i.e.
> runat-server and
> <asp:requiredfieldvalidator> etc...) but I am unable
> to get the validation
> to work without setting the <form> attribute 'runat'
> to 'server'.
>
> What happens is the form does validate itself, but
> it won't go to the
> page defined by the 'action' attribute when it is
> done. I can force it to
> go to the next page by checking the 'Page.Isvalid'
> value with
> a 'response.redirect', but the value of the fields
> entered don't go along
> with it. At least not in the normal way of the
> 'Post' method.
>
> Right now I am doing a workaround that builds a
> 'Get' style string and
> passes the information that way, but it seems a
> little odd to me that
> Microsoft would give you all the functionality of
> the validation tools,
> but no way to exit the form and go to another form
> page with the data once
> it was validated.
>
> Any help would, as always, be greatly apreciated.
>
> Thank you,
>
> John Jerles
$subst('Email.Unsub').
__________________________________________________
Do You Yahoo!?
Send your FREE holiday greetings online!
http://greetings.yahoo.com
Message #3 by "Todd Bryant" <Todd.Bryant@n...> on Fri, 7 Dec 2001 08:20:47 -0800
|
|
John,
You might try using panels to make a one page form that appears as four
pages.
That way you avoid the problem altogether. Just post back to the same
form over and over, hiding or making panels visible as necessary. That
way you don't have to worry about maintaining the state across posts.
Todd Bryant
Netdesk Corporation
xxx.xxx.xxxx FAX xxx.xxx.xxxx
e-mail: Todd.Bryant@n...
Get Ready for .NET at http://www.netdesk.com/nettraining
-----Original Message-----
From: John Jerles [mailto:johnjerles@h...]
Sent: Friday, December 07, 2001 1:14 AM
To: aspx_beginners
Subject: [aspx_beginners] Multi-Page Web Forms
Hello All,
I have been trying to figure out if it is possible to create a multi-
page web form in asp.net with server-side validation.
The problem is this: I have a 4 page form. I want the user to answer
the form with server-side validation (i.e. runat-server and
<asp:requiredfieldvalidator> etc...) but I am unable to get the
validation
to work without setting the <form> attribute 'runat' to 'server'.
What happens is the form does validate itself, but it won't go to the
page defined by the 'action' attribute when it is done. I can force it
to
go to the next page by checking the 'Page.Isvalid' value with
a 'response.redirect', but the value of the fields entered don't go
along
with it. At least not in the normal way of the 'Post' method.
Right now I am doing a workaround that builds a 'Get' style string and
passes the information that way, but it seems a little odd to me that
Microsoft would give you all the functionality of the validation tools,
but no way to exit the form and go to another form page with the data
once
it was validated.
Any help would, as always, be greatly apreciated.
Thank you,
John Jerles
$subst('Email.Unsub').
|
|
 |