or
Hi,
I am debugging a lot the last days and I was wondering if it's normal that VS2010 get flooded by script blocks.
Just run the following markup without any code behind in debug and watch your project-explorer.
After a few seconds the view is flooded with script blocks ... it seems that the same script blocks from the controls get registered again on every ajax request. Is there a way to prevent that ?
My VS 2010 sometimes needs 2 minutes to stop debugging and I can watch it removing the script blocks which is a real pain in the a..
<
form
id
=
"form1"
runat
=
"server"
>
<
telerik:RadScriptManager
ID
=
"RadScriptManager1"
runat
=
"server"
>
</
telerik:RadScriptManager
>
<
telerik:RadAjaxManager
ID
=
"RadAjaxManager1"
runat
=
"server"
>
<
AjaxSettings
>
<
telerik:AjaxSetting
AjaxControlID
=
"Timer1"
>
<
UpdatedControls
>
<
telerik:AjaxUpdatedControl
ControlID
=
"grid1"
/>
</
UpdatedControls
>
</
telerik:AjaxSetting
>
</
AjaxSettings
>
</
telerik:RadAjaxManager
>
<
asp:Timer
ID
=
"Timer1"
runat
=
"server"
Enabled
=
"true"
Interval
=
"1000"
>
</
asp:Timer
>
<
div
>
<
telerik:radgrid
ID
=
"grid1"
runat
=
"server"
></
telerik:radgrid
>
</
div
>
</
form
>
protected
void
listEntity_ItemCreated(
object
sender, RadListBoxItemEventArgs e)
{
RadListBox listBox = (RadListBox)sender;
RadListBoxItem item = e.Item;
LMEntityEntity entity =
new
LMEntityEntity(
int
.Parse(item.Value));
RadBinaryImage entityLogo = (RadBinaryImage)item.FindControl(
"entityLogo"
);
if
(entity.Logo.Length > 0)
entityLogo.DataValue = entity.Logo;
else
entityLogo.ImageUrl =
"~/images/faction-icons/"
+ _factionName.ToLower() +
".jpg"
;
item.DataBind();
UpdatePointTotal(listBox);
}
<
telerik:RadListBox
ID
=
"upgradesListBox"
runat
=
"server"
width
=
"400px"
DataKeyField
=
"LMEntityIdChild"
Height
=
"170px"
CssClass
=
"list-box"
Skin
=
"Black"
AllowDelete
=
"False"
DataValueField
=
"LMEntityIdChild"
AllowTransfer
=
"True"
TransferToID
=
"listEntityListBox"
AutoPostBack
=
"false"
AllowReorder
=
"False"
onitemdatabound
=
"upgrades_ItemDataBound"
AllowTransferDuplicates
=
"True"
AllowTransferOnDoubleClick
=
"True"
AutoPostBackOnTransfer
=
"True"
ontransferring
=
"upgrades_Transferring"
TransferMode
=
"Copy"
>
<
ItemTemplate
>
<
telerik:RadBinaryImage
id
=
"logoImage"
runat
=
"server"
CssClass
=
"list-box-icon"
DataValue='<%# (int)(Eval("LMEntity.Logo.Length"))>0?Eval("LMEntity.Logo"):null %>' height="20px" ResizeMode="Fit" width="20px" />
<
span
class
=
"list-box-text"
><
asp:Label
ID
=
"itemLabel"
runat
=
"server"
></
asp:Label
></
span
>
</
ItemTemplate
>
<
ButtonSettings
ShowTransferAll
=
"False"
TransferButtons
=
"TransferFrom"
/>
</
telerik:RadListBox
>
<
telerik:RadNumericTextBox
ID
=
"tbDays"
AutoPostBack
=
"true"
MaxValue
=
"50"
runat
=
"server"
ontextchanged
=
"tbDays_TextChanged"
>
<
NumberFormat
DecimalDigits
=
"0"
/>
</
telerik:RadNumericTextBox
>
protected void tbDays_TextChanged(object sender, EventArgs e)
{
int itemCount = int.Parse(tbDays.Text);
///Doing Some stuff..
}