Hello,
I have an ASP.NET Ajax Calendar, with AutoPostBack = false
When client change viewed month I use this event : ClientEvents-OnCalendarViewChanged="postBack"
To call this Javascript function :
Here is my Page_Load function :
The problem is when I change month, I Have this error :
What's wrong with my doPostBack function ?
Regards
Cemka
I have an ASP.NET Ajax Calendar, with AutoPostBack = false
When client change viewed month I use this event : ClientEvents-OnCalendarViewChanged="postBack"
To call this Javascript function :
function postBack(sender, args) {__doPostBack("<%= RadCalendar1.UniqueID %>", "myArgument");}Here is my Page_Load function :
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { RadCalendar1.SelectedDate = DateTime.Today; } else { string eventTarget = (this.Request["__EVENTTARGET"] == null ? string.Empty : this.Request["__EVENTTARGET"]); string eventArgument = (this.Request["__EVENTARGUMENT"] == null ? string.Empty : this.Request["__EVENTARGUMENT"]); if (eventArgument.Equals("myArgument")) { RadCalendar1.SelectedDate = DateTime.Today.AddDays(-10);
// Just for test } } FillHolidayDataset(RadCalendar1.SelectedDate); }The problem is when I change month, I Have this error :
Invalid navigation argument: [myArgument]
[ApplicationException: Invalid navigation argument: [myArgument]] Telerik.Web.UI.RadCalendar.RaisePostBackEvent(String eventArgument) +864 Telerik.Web.UI.RadCalendar.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +13 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +176 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5563 |
What's wrong with my doPostBack function ?
Regards
Cemka