How to prevent MasterPage post back

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.
 
N

Nathan Sokalski

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.
 
B

bruce barker

the master page is just another control on the page that uses it, its
not a separate page.

-- bruce (sqlwork.com)
 
G

goscottie

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.
 
G

goscottie

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.
 
H

Hillbilly

Better be careful, Mark Rae will hunt you down and scold you for top posting
:-0
 
H

Hillbilly

Better be careful, Mark Rae will hunt you down and scold you for top posting
:-0
 
H

Hillbilly

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..
 
G

goscottie

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.
 

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,995
Messages
2,570,228
Members
46,818
Latest member
SapanaCarpetStudio

Latest Threads

Top