I am using a page with several Telerik controls including RadWindow RadGrid etc. RadTextBox rad ToolTip
when I call txtBox.Focus from the server side where txtBox is a RadTextBox I get the error
Sys.ScriptLoadFailedException. The script /Script.Resource.Axd could not be loaded.
What is up?
5 Answers, 1 is accepted
I created a new radTextBox on the form, focus does work on the new one.
However, the first control that failed is on a div who is defined as:
<div runat="server" id="pnlMovement" style=" background: #E0E0FF;
position: absolute; width: 99%; height: 30px; left: 1px; top: 500px; z-index: 10;
border-color: Navy; border-style: solid; border-width: thin;">
What I do is I hide and reposition this div as needed.
The error happens to any RadTextBox on this div and not to any RadTextBox not on the div, therefore it appears that the div is the issue.
After even further study. The issue seems to be the postback. After a postback it happens.
Also please note that I am using a RadAjaxPanel for the entire form.
Could you paste your aspx and code-behind. How are you repositioning the div, are you taking it outside the RadAjaxPanel?
Thanks in advance.Regards,
the Telerik team
add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/>
Since my project predates AJAXs and was not build from an ajax template it was missing
I've found two different situations that caused this error.
A second scenario was when I was setting focus to a RadNumericTextBox (the type of rad control may not matter). I couldn't simply set focus to the control, I had to tell the panel in which the numeric text box was in to set control to the text box.
txtToFocus = item.FindControl("txtQuantityOnHand") as RadNumericTextBox;
//txToFocus.Focus(); //this way causes client side issues.
Thank you very much for sharing your findings and way to solve the error! This is much appreciated and your Telerik points were updated.