The RAD Menu is located in the master page; the RAD AJAX manager is also located in the master page.
The content page contains two RAD Calendar controls and a RAD combo box. Everything is working in the page except for the RAD Combo box. If I have the RAD Combo box on the page without the calendar, it works fine; but just says "loading" when all controls are present.
We are transitioning to a new version of our Intranet that utilizes master pages; our previous version did not use master pages and these controls did not conflict with one another. Please advise.
11 Answers, 1 is accepted
Load On Demand could have been hung in this case.
Can you please capture the request with FiddlerCap and post a link to the logs here?
Best wishes,
Simon
the Telerik team
When I enter the page and click on the Telerik ComboBox contol, it generates a status 500 and does not return values from the load on demand (1.jpg). If I then click into another control on the page; then click back into the Telerik ComboBox, a status 200 is returned and my combo box populates as expected (2.jpg).
Telerik Script Manager is in the master page.
Telerik AJAX Manager is in the content page.
Please advise.
Please also paste here the request and response of the first Load On Demand request, which fails.
All the best,
Simon
the Telerik team
Below is the combo box code:
<
telerik:RadComboBox ID="SiteID" runat="server" AllowCustomText="True" DataTextField="Name" OnItemsRequested="search_ItemsRequested2" DataValueField="SiteID" EnableItemBindingExpressions="False" EnableItemCaching="True" EnableLoadOnDemand="True" Width="200px" MarkFirstMatch="True" AutoPostBack="True">
<ExpandAnimation Type="OutBounce" />
<CollapseAnimation Type="InBounce" />
</telerik:RadComboBox>
this is the sub that executes on demand:
Protected
Sub search_ItemsRequested2(ByVal o As Object, ByVal e As Telerik.Web.UI.RadComboBoxItemsRequestedEventArgs)
Dim sql As String = ""
Dim name As String = ""
' only add items if there is text to match
If e.Text <> [String].Empty Then
' open a connection to the database
Dim strConnection As String
strConnection = ConfigurationManager.AppSettings("ConnectionString")
Dim dbCon As New SqlConnection(strConnection)
dbCon.Open()
' the query uses LIKE to match the entered text
name = e.Text.Replace(
"'", "''")
sql = "SELECT * from [Site] WHERE [Site].Name LIKE '" & name & "%'"
' create a data adapter and use it to fetch data into a table
Dim adapter As New SqlDataAdapter(sql, dbCon)
Dim dt As New DataTable()
adapter.Fill(dt)
dbCon.Close()
' use the table to add items to the combo box
SiteID.DataTextField =
"Name"
SiteID.DataValueField = "SiteID"
SiteID.DataSource = dt
SiteID.DataBind()
'Simulate a lengthy process so that the effects of caching can be seen
Threading.Thread.Sleep(SiteID.ItemRequestTimeout - 100)
End If
End Sub
The 500 status code indicates a server error during the first one or two requests.
Once you save the log produced by FiddlerCap you can use Fiddler to open it. Inside the log you will find an entry for each request. Please select one of the failing requests and post here its content.
Regards,
Simon
the Telerik team
http://xps360.com/FiddlerCap_101221-13-54.zip
Thank you for providing me with the logs.
They indicate that there has been a server-side exception caused by the event validation mechanism during the first two requests. This happens in cases a malicious postback mimicking an event of a control on the page is crafted and sent to the server. In your case, however, these conditions are false and the fact that after refocusing the RadComboBox fixes the problem means that something else is causing the exception.
Can you please try reproducing the problem in this way: after the page loads, wait a bit, interact with other controls on the page and after a while open the ComboBox. Does not still hang?
Regards,
Simon
the Telerik team
This rules out one possible cause for the event validation data corruption.
Please test something else now - set the Visible property of the DropDownList below the RadComboBox to false. How is the Load on Demand now behaving?
Best wishes,
Simon
the Telerik team
http://xps360.com/FiddlerCap_101223-13-14.zip
The previous logs showed that the value of the drop down list was sent back to the server during the load on demand request and none of the rest of the form fields. This value could falsely trigger the event validation mechanism. However, since your test did not confirm this, there could be something else that is causing the issue and it is not that obvious.
In this sense, please provide me with a working example, as simple as possible, that exhibits this behavior. Once I have such on my side I will be able to debug it more extensively and hopefully will find the root cause.
Greetings,
Simon
the Telerik team