Forms and Master Pages

R

Roshawn

I have a master page that contains an html form and a few server controls (dropdown, textbox). When I perform a postback, to
which page does the form post back - the master page or one of the content pages?

Thanks,
Roshawn


P.S. I'm tired of experimenting for the day, so I thought I'd just ask this question instead. :)
 
M

Mark Rae

I have a master page that contains an html form and a few server controls
(dropdown,
textbox). When I perform a postback, to which page does the form post
back - the master page or one of the content pages?

If you remember that a MasterPage isn't actually a 'page' at all - it's a
UserControl - then it should be clear to you...

When a content page is loaded either through redirection or postback, it
loads its associated MasterPage just like it would load any other
UserControl and constructs the page.
 
R

Roshawn

To Mark Rae:
If you remember that a MasterPage isn't actually a 'page' at all - it's a
UserControl - then it should be clear to you...

I wasn't aware of that...
When a content page is loaded either through redirection or postback, it
loads its associated MasterPage just like it would load any other
UserControl and constructs the page.

Ok. That explains it. Thanks for the help.

Have a nice day, :)
Roshawn
 
M

Mark Rae

I wasn't aware of that...

It's a common misconception - similarly, a lot of people first imagine that
MasterPages are somehow like framesets, and get annoyed at not being able to
make the MasterPage change the content page... :)
Ok. That explains it. Thanks for the help.

Welcome.
 

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

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,077
Latest member
SangMoor21

Latest Threads

Top