473,386 Members | 1,775 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Page Load

ats
I ahve a webpage that has some calls to procedures in it's Load Event.It
also has a tab strip on it. Whenever I click a tab on the page, the Page
Load event fires again. Is there a way to stop this from happening?

TIA

--
ats@jbex

It's easy to lay down and hide
Where's the warrior without his pride?

Adam and The Ants - Dog Eat Dog
Aug 8 '07 #1
9 3866
Hi,

You should be able to just check if the page .IsPostBack, eg.

Sub Page_Load
If page.IsPostBack Then return
'rest of code here
End Sub
"ats@jbex" <al***@allenjones.NOSPAM.co.PLEASE.ukwrote in message
news:35***************************@40tude.net...
>I ahve a webpage that has some calls to procedures in it's Load Event.It
also has a tab strip on it. Whenever I click a tab on the page, the Page
Load event fires again. Is there a way to stop this from happening?

TIA

--
ats@jbex

It's easy to lay down and hide
Where's the warrior without his pride?

Adam and The Ants - Dog Eat Dog
Aug 8 '07 #2
How does this stop the postback from occurring (which is what I think the OP
wants).


"Bill McCarthy" <Bi**@NOSPAM.comwrote in message
news:el**************@TK2MSFTNGP04.phx.gbl...
Hi,

You should be able to just check if the page .IsPostBack, eg.

Sub Page_Load
If page.IsPostBack Then return
'rest of code here
End Sub
"ats@jbex" <al***@allenjones.NOSPAM.co.PLEASE.ukwrote in message
news:35***************************@40tude.net...
>>I ahve a webpage that has some calls to procedures in it's Load Event.It
also has a tab strip on it. Whenever I click a tab on the page, the Page
Load event fires again. Is there a way to stop this from happening?

TIA

--
ats@jbex

It's easy to lay down and hide
Where's the warrior without his pride?

Adam and The Ants - Dog Eat Dog

Aug 8 '07 #3
The fact that you are in a web app and now a Windows app means that when you
use the web form controls, they must post back to the server to perform some
action. This is what is happening with your tab strip.
"ats@jbex" <al***@allenjones.NOSPAM.co.PLEASE.ukwrote in message
news:35***************************@40tude.net...
>I ahve a webpage that has some calls to procedures in it's Load Event.It
also has a tab strip on it. Whenever I click a tab on the page, the Page
Load event fires again. Is there a way to stop this from happening?

TIA

--
ats@jbex

It's easy to lay down and hide
Where's the warrior without his pride?

Adam and The Ants - Dog Eat Dog

Aug 8 '07 #4
ats
On Wed, 8 Aug 2007 09:45:24 -0400, Scott M. wrote:
The fact that you are in a web app and now a Windows app means that when you
use the web form controls, they must post back to the server to perform some
action. This is what is happening with your tab strip.
"ats@jbex" <al***@allenjones.NOSPAM.co.PLEASE.ukwrote in message
news:35***************************@40tude.net...
>>I ahve a webpage that has some calls to procedures in it's Load Event.It
also has a tab strip on it. Whenever I click a tab on the page, the Page
Load event fires again. Is there a way to stop this from happening?

TIA

--
ats@jbex

It's easy to lay down and hide
Where's the warrior without his pride?

Adam and The Ants - Dog Eat Dog
Thanks to all for the help. I have now got a check for Page.IsPostBack and
if it is then it no longer calls all of my procedures. This has fixed the
problem mostly.

--
ats@jbex

Those who died are justified, for wearing the badge, they're the chosen
whites
You justify those that died by wearing the badge, they're the chosen whites

Rage Against The Machine - Killing In The Name
Aug 8 '07 #5
On Aug 8, 9:44 am, "Scott M." <s-...@nospam.nospamwrote:
How does this stop the postback from occurring (which is what I think the OP
wants).

"Bill McCarthy" <B...@NOSPAM.comwrote in message

news:el**************@TK2MSFTNGP04.phx.gbl...
Hi,
You should be able to just check if the page .IsPostBack, eg.
Sub Page_Load
If page.IsPostBack Then return
'rest of code here
End Sub
"ats@jbex" <al...@allenjones.NOSPAM.co.PLEASE.ukwrote in message
news:35***************************@40tude.net...
>I ahve a webpage that has some calls to procedures in it's Load Event.It
also has a tab strip on it. Whenever I click a tab on the page, the Page
Load event fires again. Is there a way to stop this from happening?
TIA
--
ats@jbex
It's easy to lay down and hide
Where's the warrior without his pride?
Adam and The Ants - Dog Eat Dog
I'm pretty sure OP wasn't asking about how to prevent postbacks - as
that would defeat the entire purpose of ASP.Net's server side modal. I
think the OP just wanted to know how to conditional execute code in
the Load method.

Thanks,

Seth Rowe

Aug 8 '07 #6
Ats,

Interesting, and how do you recognise a real postback now?

Are you sure that you have no redirects which are starting and it is about
new pages?

Cor

"ats@jbex" <al***@allenjones.NOSPAM.co.PLEASE.ukschreef in bericht
news:yp*****************************@40tude.net...
On Wed, 8 Aug 2007 09:45:24 -0400, Scott M. wrote:
>The fact that you are in a web app and now a Windows app means that when
you
use the web form controls, they must post back to the server to perform
some
action. This is what is happening with your tab strip.
"ats@jbex" <al***@allenjones.NOSPAM.co.PLEASE.ukwrote in message
news:35***************************@40tude.net.. .
>>>I ahve a webpage that has some calls to procedures in it's Load Event.It
also has a tab strip on it. Whenever I click a tab on the page, the Page
Load event fires again. Is there a way to stop this from happening?

TIA

--
ats@jbex

It's easy to lay down and hide
Where's the warrior without his pride?

Adam and The Ants - Dog Eat Dog

Thanks to all for the help. I have now got a check for Page.IsPostBack and
if it is then it no longer calls all of my procedures. This has fixed the
problem mostly.

--
ats@jbex

Those who died are justified, for wearing the badge, they're the chosen
whites
You justify those that died by wearing the badge, they're the chosen
whites

Rage Against The Machine - Killing In The Name
Aug 8 '07 #7
Are you sure that you have no redirects which are starting and it is about
new pages?
IIRC Response.Redirect causes the client to send a GET request for the
page not a POST request so the code will execute like normal in the
OP's Page_Load handler.

Thanks,

Seth Rowe

Aug 8 '07 #8
Rowe,

I realized me that a redirect is a new page. However you did not give me the
time to correct this.

:-)

Cor

"rowe_newsgroups" <ro********@yahoo.comschreef in bericht
news:11*********************@x35g2000prf.googlegro ups.com...
>Are you sure that you have no redirects which are starting and it is
about
new pages?

IIRC Response.Redirect causes the client to send a GET request for the
page not a POST request so the code will execute like normal in the
OP's Page_Load handler.

Thanks,

Seth Rowe
Aug 9 '07 #9
However you did not give me the time to correct this.

No mercy!

:-)

Thanks,

Seth Rowe

Aug 9 '07 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: user | last post by:
when i first load index.php with arguments ie: "index.php?page=x", the $_SERVERvalue is null. I then get the session id appended to each link. If i refresh the page, I get the $_SERVER I want, but...
1
by: WFB | last post by:
Hi, I have a base class from which all of my pages derive (ABCBasePage). For example, ABCCustomerSelect Inherits ABCPasePage. I would now like to have ABCPocketSelect which should inherit from...
0
by: Frank 'Olorin' Rizzi | last post by:
Hello everyone. This is quite convoluted, but I'll try to make it simple. I have a couple of bottom-line questions (I guess): 1~ what happens between the Page_Load routine in the code behind...
2
by: Sam | last post by:
I have a custom control (MyTextBox - taken from Microsoft website) that implements the IPostBackDataHandler interface. It is added to the controls collection of a placeholder control during the...
7
by: Goober | last post by:
I have a page that receives a session variable from the default.aspx. On Page load, the code in Page load gets executed twice. So far, no problem. It sets the session variable each time,...
7
by: UJ | last post by:
I've got a page with a user control on it. While the page is loading, it needs to check certain conditions of the user object to enable/disable things on the screen. Currently in the page_load of...
5
by: venky | last post by:
Hi, I have a question, i have a web control in my web page. Let say i have page pag1.aspx and control.ascx and page1 contains control. I have written code on the page load of page and also the...
2
by: ricardo.sobral.santos | last post by:
Hello, I am trying to get the value of the radiobuttonlist. The problem is that I need it to be unselected at every page load. The radiobuttonlist is set to autopostback (true). My idea is...
3
by: GauravGupta | last post by:
i want to know that is it posible to call button click event before page load event on post back.... please help me....
1
by: hemantkamb | last post by:
Hi…. I have created one website with Master and content page . I have taken TreeView Control on master page. And I wants that when I click to tree node the value of tree node is added to...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.