I have used the AjaxManager fine with other projects in the past and works as expected. However, I have used it in aspx pages that didn't have a masterpage attached to it with no problem. I am using it now inside a user control within an aspx page. That aspx page has a master page associated with it that already contains the RadScriptManager, so I obvioulsy can't put it inside my user control; otherwise I'd get the msg that I can only have 1 script manager tag.
Could you please let me know what I'm doing incorrectly in this scenario? See the boldfacing for clarity...
Here is my html which is in a user control:
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
<AjaxSettings>
<telerik:AjaxSetting AjaxControlID="lstPatientEDLogs">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="lstPatientEDLogs" />
</UpdatedControls>
</telerik:AjaxSetting>
</AjaxSettings>
</telerik:RadAjaxManager>
<table cellpadding="1" cellspacing="1" width="100%">
<tr>
<td>
<asp:Panel ID="pnlData" runat="server" GroupingText="Data Type" Width="1100px">
<asp:RadioButtonList ID="rblDataType" RepeatDirection="Horizontal" TextAlign="Right"
runat="server" Width="100%" AutoPostBack="true" OnSelectedIndexChanged="rblDataType_SelectedIndexChanged">
<asp:ListItem Text="Chart ==> Demographics" Selected="True"></asp:ListItem>
<asp:ListItem Text="Patient ==> Coding"></asp:ListItem>
</asp:RadioButtonList>
</asp:Panel>
</td>
</tr>
<tr>
<td>
<asp:Panel ID="pnlDate" runat="server" ScrollBars="Horizontal" GroupingText="Date Filter">
<table>
<tr>
<td>
Date Of Service:
</td>
<td>
<asp:ListBox ID="lstPatientEDLogs" runat="server" Rows="1"></asp:ListBox>
</td>
</tr>
</table>
</asp:Panel>
</td>
</tr>
Here is my code behind:
private void LoadDatesofSvc()
{
lstPatientEDLogs.Items.Clear();
if (rblDataType.SelectedItem.Text == "Patient ==> Coding")
{
var query = DbContext.SelectPatientEDLogs();
string strDate = "";
foreach (var q in query)
{
DateTime dt = q.DateOfService ?? DateTime.Now;
strDate = dt.ToString("MM/dd/yyyy");
lstPatientEDLogs.Items.Add(new ListItem(strDate, strDate));
}
lstPatientEDLogs.Items.Insert(0, "");
}
else if (rblDataType.SelectedItem.Text == "Chart ==> Demographics")
{
var query = DbContext.SelectEDLogs();
string strDate = "";
foreach (var q in query)
{
DateTime dt = q.DateOfService ?? DateTime.Now;
strDate = dt.ToString("MM/dd/yyyy");
lstPatientEDLogs.Items.Add(new ListItem(strDate, strDate));
}
lstPatientEDLogs.Items.Insert(0, "");
}
}
protected void rblDataType_SelectedIndexChanged(Object sender, EventArgs e)
{
LoadDatesofSvc();
}