By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
426,133 Members | 1,092 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 426,133 IT Pros & Developers. It's quick & easy.

How to supress pre-render evnet when page post back

P: n/a
JG
Hi all,
I have a simple aspx page. On the page there is only one button. When I
click on the button, the event sequence is Page_Load, Button1_click and
Page_PreRender. How do I supress the PreRender event? I know if I call
Server.Transfer or Reponse.Redirect in the Button1 click event, the page
prerender event will not occur.
Thanks.

Jie
Nov 18 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Hi JG:

Trying to stop the PreRender event is trying to swim upstream against
the current. There are probably easier ways to achieve what you need
to do. What's the ultimate goal of trying to whack PreRender?

--
Scott
http://www.OdeToCode.com/blogs/scott/

On Wed, 20 Oct 2004 23:25:47 -0400, "JG" <JG******@rogers.com> wrote:
Hi all,
I have a simple aspx page. On the page there is only one button. When I
click on the button, the event sequence is Page_Load, Button1_click and
Page_PreRender. How do I supress the PreRender event? I know if I call
Server.Transfer or Reponse.Redirect in the Button1 click event, the page
prerender event will not occur.
Thanks.

Jie


Nov 18 '05 #2

P: n/a
Jie
Hi, Scott,
My goal is to avoid the process in pre-render event. In the Button1 click
event, I open a new aspx page using Java script. The first page will not be
used after the second page is loaded. It is necessay to run the codes in the
pre-render event at this situation because this page is not used at all. I
know I can set such as bStopPreRender = True in the button click event and
check the value of bStopPreRender in the prerender event. I am wondering if
there is any way to stop the pre-render event. Thanks

Jie
"Scott Allen" <bitmask@[nospam].fred.net> wrote in message
news:38********************************@4ax.com...
Hi JG:

Trying to stop the PreRender event is trying to swim upstream against
the current. There are probably easier ways to achieve what you need
to do. What's the ultimate goal of trying to whack PreRender?

--
Scott
http://www.OdeToCode.com/blogs/scott/

On Wed, 20 Oct 2004 23:25:47 -0400, "JG" <JG******@rogers.com> wrote:
Hi all,
I have a simple aspx page. On the page there is only one button. When I
click on the button, the event sequence is Page_Load, Button1_click and
Page_PreRender. How do I supress the PreRender event? I know if I call
Server.Transfer or Reponse.Redirect in the Button1 click event, the page
prerender event will not occur.
Thanks.

Jie

Nov 18 '05 #3

P: n/a
Hi Jie:

I think setting the flag is a safer approach, and easier for everyone
to see what is happening.

--
Scott
http://www.OdeToCode.com/blogs/scott/

On Thu, 21 Oct 2004 10:29:52 -0400, "Jie"
<ji*****@tequilasoftware.com> wrote:
Hi, Scott,
My goal is to avoid the process in pre-render event. In the Button1 click
event, I open a new aspx page using Java script. The first page will not be
used after the second page is loaded. It is necessay to run the codes in the
pre-render event at this situation because this page is not used at all. I
know I can set such as bStopPreRender = True in the button click event and
check the value of bStopPreRender in the prerender event. I am wondering if
there is any way to stop the pre-render event. Thanks

Jie
"Scott Allen" <bitmask@[nospam].fred.net> wrote in message
news:38********************************@4ax.com.. .
Hi JG:

Trying to stop the PreRender event is trying to swim upstream against
the current. There are probably easier ways to achieve what you need
to do. What's the ultimate goal of trying to whack PreRender?

--
Scott
http://www.OdeToCode.com/blogs/scott/

On Wed, 20 Oct 2004 23:25:47 -0400, "JG" <JG******@rogers.com> wrote:
>Hi all,
>I have a simple aspx page. On the page there is only one button. When I
>click on the button, the event sequence is Page_Load, Button1_click and
>Page_PreRender. How do I supress the PreRender event? I know if I call
>Server.Transfer or Reponse.Redirect in the Button1 click event, the page
>prerender event will not occur.
>Thanks.
>
>Jie
>


Nov 18 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.