How to prevent MasterPage post back

  • Thread starter Thread starter goscottie
  • Start date Start date
G

goscottie

Hi,
Simply put, I have a control in MasterPage and another in content.
When the control in content fires off post back, MasterPage also runs
and returns post back. I want to control these where post back
happens in respected area, within content or within MasterPage. What
will be the simplest and logical way to implement this? TIA.
 
When a postback occurs, the Init and Load events for both the Master Page
and the Content Page will be triggered. What, where, and when specifically
is it that you want to prevent code from being executed? Until you give more
detail on what you are trying to do, I'm not sure if anyone will be able to
help you.
 
the master page is just another control on the page that uses it, its
not a separate page.

-- bruce (sqlwork.com)
 
Thanks for reply. So I have a button with a textbox for submit in
MasterPage, like search feature. I also have similar setting in
Content but for to submit something else for postback action. User
sees both inputs. However, user may select to click one in MasterPage
but Content Also fires off and gets undesired result there. Vice
versa occurs when Content fires off and MasterPage also reacts. Ideal
solution would be to isolate both world. I hope I describe enough. I
apprieciate your reply and let me know if I need to clarify further.
Thanks.
 
Page_Load is the place where I would like to isolate the action,
either by bypassing the event or within this method to detect and skip
the most of logic there.
 
I warned bruce and Nathan you might be hunting them down to warn them not to
top post. Thought I'd save you some time so you could focus on your real
value to us all..
 
Yes, I already have IsPostBack check in my Page_Load. I just can't
tell if the postback occurred because of button in MasterPage or
button in Content. Let me go through the links given and do some
reading. Thanks a bunch.
 
Back
Top