Click here to Skip to main content
15,885,782 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
VB
Protected Sub Page_Init(sender As Object, e As System.EventArgs) Handles Me.Init
    startDatelbl.Text = New DateTime(Now.Year, Now.Month, Now.Day)
End Sub



in above code store the label current date.
But i can add two button next And Prev in my code
when next button click 21 days add in startdatelbl.
but when click save button, page is load and startdatelblvalue can chage and list view fill from starting. startlbldate change value
Posted
Comments
So, what is the issue? Handle the click event of those buttons and do the needful.
Ashvinrajkot 13-Feb-14 0:20am    
when startdatelbl value change on the page loading
Ashvinrajkot 13-Feb-14 0:22am    
i can store the value when add 21 days in label but page load startdatelbl value change
That is because you have assigned its value again in Page_Init.
Ashvinrajkot 13-Feb-14 1:29am    
yes

1 solution

Quote:
i can store the value when add 21 days in label but page load startdatelbl value change
That is because you have assigned its value again in Page_Init.

So, change your Logic. Otherwise it will behave the same.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900