search envelope-o feed check
Home Unanswered Active Tags New Question
user comment-o

DayPilotNavigator and updatepanel, DropDownList1_SelectedIndexChanged Error: JScript runtime

Asked by Anonymous
9 years ago.

I tried to put a drop down list in an update panel and then display the employee schedule in the calendar accordingly.
The calendar also has a DayPilotNavigator.

When I first hit the dropdown list, everything is right.
But the second time I select a different employee, I got the following javascript error.
And the DropDownList1_SelectedIndexChanged method no longer working.

I used the latest DayPilotProTrial-7.3.2841.
The problem is DayPilotNavigator .
It works fine without it.
DayPilotNavigator causes the javascript error when there is a update panel
You can put a break point at

int a =123;

to see the error
The following is my code with all the unnecessary removed.
Microsoft JScript runtime error: Sys.WebForms.PageRequestManagerServerErrorException: Index and length must refer to a location within the string.
Parameter name: length

using System;
using System.Data;

namespace WebApplication2
public partial class WebForm1 : System.Web.UI.Page

protected void Page_Load(object sender, EventArgs e)


protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
int a =123;
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="WebApplication2.WebForm1" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<%@ Register Assembly="DayPilot" Namespace="DayPilot.Web.Ui" TagPrefix="DayPilot" %>
<html xmlns="">
<head id="Head1" runat="server">
<title>Untitled Page</title>
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server" />
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="True" OnSelectedIndexChanged="DropDownList1_SelectedIndexChanged">
<asp:ListItem Selected="True">zero</asp:ListItem>
<br />

<asp:AsyncPostBackTrigger ControlID="DropDownList1" EventName="SelectedIndexChanged" />

<DayPilot:DayPilotNavigator ID="DayPilotNavigator1" runat="server" />

Comment posted by Dan Letecky [DayPilot]
9 years ago.

It seems that DayPilotNavigator.Render() is called by .NET framework although the navigator is not inside the UpdatePanel. This causes the init script to be called with every partial PostBack.

This error message is a side effect. I'm investigating the issue.

Answer posted by Dan Letecky [DayPilot]
9 years ago.

This bug is fixed now in build 7.3.2854. You can download it in the sandbox:

Please let me know if there is any problem.

This question is more than 3 months old and has been closed. Please create a new question if you have anything to add.