469,613 Members | 1,319 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,613 developers. It's quick & easy.

asp Page events execute twice after PostBack

Hi!

I have a page containing datagrid. When datagrid is edited there is a
calendar. When I change the date for the first time all page events are
executed twice and:
when they are executed for the first time they are executed in response to
post back as it should be, but for the second time the page is reloaded
again just like it would be called for the first time.
Please Help Me!

Jarek

Nov 17 '05 #1
1 1684
Be sure that when the datagrid changes, it doesn't automatically
postback to the server. You may also want to use the Page.IsPostBack
property. Using this will help you only run the Page_Load code once,
instead of everytime the page gets posted back to the server.

I.e.

sub Page_Load
If Not Page.IsPostBack then
...run the code that should only be executed the first time
the page loads...
end if
end Sub
I hope this helps.

Neil
"Jarek" <pr******@poczta.onet.pl> wrote in message news:<bi**********@news.onet.pl>...
Hi!

I have a page containing datagrid. When datagrid is edited there is a
calendar. When I change the date for the first time all page events are
executed twice and:
when they are executed for the first time they are executed in response to
post back as it should be, but for the second time the page is reloaded
again just like it would be called for the first time.
Please Help Me!

Jarek

Nov 17 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by William LaMartin | last post: by
2 posts views Thread by John Lau | last post: by
6 posts views Thread by MooreSmnith | last post: by
reply views Thread by Rajeev | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.