Post Back events
-
Hey people, I have a page that has 3 calendars across the bottom of it that are dynamically drawn from data from a database. I also have A picture gallery set up above the calendars. Now when I click on a new picture in order to make it bigger, the page does a postback. At this point i get errors w/ my dynamically drawn labels and such. Sometimes it say invailid attempt to read when reader is closed. Is there a way i can tell the page that on a post back dont reload the calendar information and still have it show up on the bottom of the page? Thanks Tommy
-
Hey people, I have a page that has 3 calendars across the bottom of it that are dynamically drawn from data from a database. I also have A picture gallery set up above the calendars. Now when I click on a new picture in order to make it bigger, the page does a postback. At this point i get errors w/ my dynamically drawn labels and such. Sometimes it say invailid attempt to read when reader is closed. Is there a way i can tell the page that on a post back dont reload the calendar information and still have it show up on the bottom of the page? Thanks Tommy
if(!Page.IsPostBack) { // Do calendar stuff } else { // Dont do it } If you for whatever reason cannot read again then you are going to have to store the data in a date structure of some sort, serialize it, and then save it the session. Then your else would be retrieving that data structure and reloading the calendar. Hope that this helps, Jim