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

ViewState Problem with a Form?

P: n/a
have a parent aspx page which is a container for a second child aspx page.

The parent loads up a header and tells the child aspx page which control to
display.
For example, when I am using a form control, which is a common type of
control I display:

PARENT.ASPX contents
---Header.ascx control (navigation)
---Child.aspx Page -----------which contains-------------- Form1.ascx

Works fine, except for one problem scenario:
Step 1) User enters information into the form (Form1.ascx) and the form has
validation controls.
Step 2) The user happens to enter incorrect information and the validation
controls intercede.
Step 3) Problem: IF the validation controls intercede, the page is
redirected to Child.aspx instead of the Parent.aspx page.

Is this a huge problem? Not really, it's just that if and when a user enters
incorrect information into a form, I lose my navigational header
(Header.ascx). Looks ugly. Oh yes... and here's the real catcher... it
does NOT act this way when I debug and run on my local development machine!
Go figure!

Any advice?
Thanks

Nov 19 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Due to the Processing model, you probably don't want to include one page
inside of another. I think that what may be happening is that the Init
calls are cascaded from the innermost control to the page (they run
backwards) and the inner page probably is not propogating that cal to the
parent page.

See if there's any way you can' use user controls for this.

"Luis Esteban Valencia" <lu***@epm.net.co> wrote in message
news:%2******************@TK2MSFTNGP14.phx.gbl...
have a parent aspx page which is a container for a second child aspx page.

The parent loads up a header and tells the child aspx page which control to display.
For example, when I am using a form control, which is a common type of
control I display:

PARENT.ASPX contents
---Header.ascx control (navigation)
---Child.aspx Page -----------which contains-------------- Form1.ascx

Works fine, except for one problem scenario:
Step 1) User enters information into the form (Form1.ascx) and the form has validation controls.
Step 2) The user happens to enter incorrect information and the validation
controls intercede.
Step 3) Problem: IF the validation controls intercede, the page is
redirected to Child.aspx instead of the Parent.aspx page.

Is this a huge problem? Not really, it's just that if and when a user enters incorrect information into a form, I lose my navigational header
(Header.ascx). Looks ugly. Oh yes... and here's the real catcher... it
does NOT act this way when I debug and run on my local development machine! Go figure!

Any advice?
Thanks

Nov 19 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.