ViewState Problem with a Form?

  • Thread starter Luis Esteban Valencia
  • Start date
L

Luis Esteban Valencia

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
 
D

David Jessee

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top