Connectionless ??
-
I understand that the ADO.NET’s number one advantage is that is it connectionless. Well I’m having some troubles implementing this. This is what I have: An aspx file with a System.Web.UI.WebControles.Calendar and its code behind file. I’m trying to display daily totals on the calendar and so I don’t need the most up to date information all the time; however, every time I click on a cell a post back is fires and the page goes back out the DB. This is way too slow. How can I make it so that the info only loads on an initial login and expires when the session expirers? Ronald Hahn, CNT - Computer Engineering Technologist New Technologies Analyst HahnTech Affiliated With Code Constructors Edmonton, Alberta, Canada Email: rhahn82@telus.net
-
I understand that the ADO.NET’s number one advantage is that is it connectionless. Well I’m having some troubles implementing this. This is what I have: An aspx file with a System.Web.UI.WebControles.Calendar and its code behind file. I’m trying to display daily totals on the calendar and so I don’t need the most up to date information all the time; however, every time I click on a cell a post back is fires and the page goes back out the DB. This is way too slow. How can I make it so that the info only loads on an initial login and expires when the session expirers? Ronald Hahn, CNT - Computer Engineering Technologist New Technologies Analyst HahnTech Affiliated With Code Constructors Edmonton, Alberta, Canada Email: rhahn82@telus.net
HahnTech wrote: I’m trying to display daily totals on the calendar and so I don’t need the most up to date information all the time; however, every time I click on a cell a post back is fires and the page goes back out the DB. This is because you have not put your code that connects to the database inside an !IsPostback block. Therefore, every time you post back, the page loads and replaces the data in your viewstate with a fresh copy. in Page_Load if (!IsPostback) { //call method in your data tier. } Christian Graus - Microsoft MVP - C++
-
HahnTech wrote: I’m trying to display daily totals on the calendar and so I don’t need the most up to date information all the time; however, every time I click on a cell a post back is fires and the page goes back out the DB. This is because you have not put your code that connects to the database inside an !IsPostback block. Therefore, every time you post back, the page loads and replaces the data in your viewstate with a fresh copy. in Page_Load if (!IsPostback) { //call method in your data tier. } Christian Graus - Microsoft MVP - C++
That just might work! Thanks. This has another question now. Can you point me in the direction of some good Practical literature ie code examples, of an asp.net page life cycle. Ronald Hahn, CNT - Computer Engineering Technologist New Technologies Analyst HahnTech Affiliated With Code Constructors Edmonton, Alberta, Canada Email: rhahn82@telus.net
-
That just might work! Thanks. This has another question now. Can you point me in the direction of some good Practical literature ie code examples, of an asp.net page life cycle. Ronald Hahn, CNT - Computer Engineering Technologist New Technologies Analyst HahnTech Affiliated With Code Constructors Edmonton, Alberta, Canada Email: rhahn82@telus.net
HahnTech wrote: Can you point me in the direction of some good Practical literature ie code examples, of an asp.net page life cycle. The BEST book is 'Essential ASP.NET with Examples in C#' by Fritz Onion. It's also pretty cheap. The short version is Page_Init LoadViewState Page_Load Page_PreRender SaveViewState But in ASP.NET 2.0 there are a lot more events to hook into ( I dunno if this is a good thing or not ) Christian Graus - Microsoft MVP - C++