Click here to Skip to main content
15,921,454 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
hello friends,

I used ajax toolkit 3.5 for calendar extender and i placed restrictions for a specific period on the calendar. I put this restriction on master page as a different period is selected by different login user. So according to login user period is restricted in whole application.

Below code is working fine for each page without updatepanel, but when I put updatepanel, this restriction is removed. So kindly provide some solution for this issue.

Thanks in Advance,
Sonal Patel

What I have tried:

I put the code in master page as below:

foreach (Control ctrl in ContentPlaceHolder1.Controls.OfType<ajaxcontroltoolkit.calendarextender>())
if (ctrl is AjaxControlToolkit.CalendarExtender)
((AjaxControlToolkit.CalendarExtender)(ctrl)).StartDate = Convert.ToDateTime("2017/01/01");
((AjaxControlToolkit.CalendarExtender)(ctrl)).EndDate = Convert.ToDateTime("2017/01/30");

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