473,387 Members | 1,569 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,387 software developers and data experts.

Page_Load not called when page is referenced again

Hi,
I have an aspx page that should refresh a list containing items from a
database.
But it only refreshes the first time, after I navigate to other pages and
then return to it, it doesn't call de Page_Load proc. So changes in the list
are not reflected.

I've no idea what the problem may be, maybe it's got something to do with a
UserControl I have inserted.
Please help, here my Page_Load code
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
If Not Page.IsPostBack Then
FillListWithItemsFromDataBase()
End If
End Sub

Thanks,

Gustavo De la Espriella
Nov 18 '05 #1
1 1004
Hi,
From your code it seems that in your page load you are checking for the
postback to call your "FillListWithItemsFromDataBase()"

Remove the following check
If Not Page.IsPostBack Then
---
HTH
Regards
Ashish M Bhonkiya

"Gustavo De la Espriella" <qq@qqq.qq.qq> wrote in message
news:%2***************@TK2MSFTNGP09.phx.gbl... Hi,
I have an aspx page that should refresh a list containing items from a
database.
But it only refreshes the first time, after I navigate to other pages and
then return to it, it doesn't call de Page_Load proc. So changes in the list are not reflected.

I've no idea what the problem may be, maybe it's got something to do with a UserControl I have inserted.
Please help, here my Page_Load code
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
If Not Page.IsPostBack Then
FillListWithItemsFromDataBase()
End If
End Sub

Thanks,

Gustavo De la Espriella

Nov 18 '05 #2

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

Similar topics

13
by: z. f. | last post by:
Hi, i have a class that is derived from System.Web.UI.Page, and this is the class i use in my application as PageBase. all other page classes are deriverd from my PageBase instead of the...
2
by: magister | last post by:
Hello I have a default.aspx page with which has an iframe. In the code-behind of the default.aspx page it loads the 'src' attribute of the iframe. The iframe loads another aspx page, but...
4
by: Julia | last post by:
Hi Everyone, I am using webbrowser control to post data to an aspx page. However, for some reason, the aspx page sometimes will execute page_load event twice, and sometimes execute it once. So I...
6
by: Dot net work | last post by:
I've read quite a few threads on these groups about this. When someone says the following: "My Page_Load gets called twice on a button click postback" The replies are: "Do you have...
14
by: V. Jenks | last post by:
I'm a little rusty having not touched .NET for 6 months and I can't remember why Page_Load is happening twice in this code: private void Page_Load(object sender, System.EventArgs e) {...
2
by: McGeeky | last post by:
I use page_load to call a stored procedure and populate the form. When the user clicks the OK button on the form I have implemented an event handler behind it (OKButton_Click()) that calls another...
5
by: Andy | last post by:
Hi all, I have a site with the following architecture: Common.Web.dll - Contains a CommonPageBase class which inherits System.Web.UI.Page myadd.dll - Contains PageBase which inherits...
9
by: coltrane | last post by:
I am just learing ASP.Net and my first app has a simple Page_Load that just sets a variable. This does not seem to be called. The following is a snippet of the page: <script runat="server"...
11
by: fiefie.niles | last post by:
I am using ASP.NET 2005 and I have a simple form. Page_Load calls a sub mySub that does not do anything (for testing purposes). But, Page_Load gets called twice. On every single ASPX page in my...
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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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.