public boolean var always resets to false
-
I have a public boolean var that is always resetting to false even though I have set it to be true in the final method of the code. I have a calendar object that when the first date is selected it will populate the "startDate" text box with that date, then set the public boolean IsStartDate = True. Upon the next selected date on the calendar the "endDate" text box will be populated with that specific date b/c the IsStartDate boolean var should be set to True now. So... the boolean should be my toggle, but it continue to reset itself to false even after I have set it to true. There is no code in the Page_Load method that sets the IsStartDate = False either, so its not resetting it in the postback. Any ideas? Thanks!!! cavall "Nothing is at last sacred, but the integrity of your own mind." "What lies behind us and what lies before us are nothing compared to what lies within us." - Ralph Waldo Emerson
-
I have a public boolean var that is always resetting to false even though I have set it to be true in the final method of the code. I have a calendar object that when the first date is selected it will populate the "startDate" text box with that date, then set the public boolean IsStartDate = True. Upon the next selected date on the calendar the "endDate" text box will be populated with that specific date b/c the IsStartDate boolean var should be set to True now. So... the boolean should be my toggle, but it continue to reset itself to false even after I have set it to true. There is no code in the Page_Load method that sets the IsStartDate = False either, so its not resetting it in the postback. Any ideas? Thanks!!! cavall "Nothing is at last sacred, but the integrity of your own mind." "What lies behind us and what lies before us are nothing compared to what lies within us." - Ralph Waldo Emerson
Use ViewState to keep the value between postbacks! Al
-
Use ViewState to keep the value between postbacks! Al