Auto Postback Issue

  • Thread starter Thread starter yoyo
  • Start date Start date
Y

yoyo

Hi,

I've added a button control in my webpage, and called a onClick event.

However it will always go back to the page load, then execute my onClick
event.

Is there a way which I can bypass page load??

Regards
 
If you want to skip some operations that are made in the Page Load, then you
can construct an if clause as
If not IsPostBack then
..operations you want to make in the load event...
End If
 
You need to understand the event flow and sequence. During
postback the page load function is called before the
onClick event.
If u need to stop some action in the page load, u need to
use Page.IsPostBack to check if the page is called as the
first request or post back request and act accordingly.
Does this answer your question?
 
I get what you mean. But there's some actions in the page load that will be
used by other events.

And there's no way I can detect that the event comes from this onClick event
and stop a particular action.

So now I am researching whether I can go straight to the onClick function
without going to the page load.
 
Back
Top