Refreshing Asp:Calendar on MasterPage

dejaanbu
dejaanbu used Ask the Experts™
on
Hello All,

I have a asp:calendar control which is inside an updatepanel on the masterpage. In content page, i have the interface for adding /deleting/changing events. these changes should be reflected in the asp:calendar located on masterpage.   the functionalities in contentpage are handled in Javascript, so i am calling

__doPostBack('Themasterpage updatepanel's uniqueid' , '')  once event is added/deleted/changed in contentpage.

when i trace, it fires Calendar's Dayrender event, but the calendar shows old data . If i add another event and then trace, then the Calendar shows the previously added event correctly but not showing secondly added event and so on.

(each second time, the calendar shows previously added new event).

i have tried ClientId instead of uniqueId  , - > the same results

also tried having a hidden button on masterpage, and on click of that, calling, updatepanel's update method , instead of dopostback, called document.getelementbyid('btn.clientid').click()  -> the same results come

anyone can suggest what is wrong here?

Any help is greatly appreciated!
calendar.png
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Kamal KhaleefaInformation Security Specialist

Commented:
in code behind of your content page
try to find the control of the calendar and try to set it
example:

   Dim x As Calendar= Me.Page.Master.FindControl("calender id")
then set x to ur value

Author

Commented:
hi,

i am able to get the referrence of the calendar in masterpage. the problem is Calendar's Day render method should fire and re-draw the calendar.
Commented:
i am able to solve this using setTimeout . Thanks for ur comment anyway..

Author

Commented:
Solved myself

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial