Hi!
We have an ASP.NET page with a lot of Rad controls including (Textboxes, Lists, comboboxes) and a RadGrid. I'm trying to improve the performance of the page and currently about 35% of the page size is occupied by the script blocks of Rad controls. Example of the javascript statements are mentioned below and these get repeated for each control. I'm guessing that this gets generated on-the-fly when the control is spitted out to HTML.
Is there a way one could compress/minimize the javascript code on the page? Any help/suggestions would be appreciated.
------------Example Javascript function calls on the page ----------
Sys.Application.add_init(function() {
$create(Telerik.Web.UI.RadTextBox, {"_focused":false,"_postBackEventReferenceScript":"setTimeout(\"__doPostBack(\\\u0027ctl00$PageContent$woMaint$tbxRateSchedule\\\u0027,\\\u0027\\\u0027)\", 0)","_skin":"WebBlue","clientStateFieldID":"ctl00_PageContent_woMaint_tbxRateSchedule_ClientState","enabled":true,"styles":{HoveredStyle: ["width:50%;", "riTextBox riHover"],InvalidStyle: ["width:50%;", "riTextBox riError"],DisabledStyle: ["width:50%;", "riTextBox riDisabled"],FocusedStyle: ["width:50%;", "riTextBox riFocused"],EmptyMessageStyle: ["width:50%;", "riTextBox riEmpty"],ReadOnlyStyle: ["width:50%;", "riTextBox riRead readonly"],EnabledStyle: ["width:50%;", "riTextBox riEnabled"]}}, null, null, $get("ctl00_PageContent_woMaint_tbxRateSchedule"));
});
Sys.Application.add_init(function() {
$create(Telerik.Web.UI.RadTextBox, {"_focused":false,"_postBackEventReferenceScript":"setTimeout(\"__doPostBack(\\\u0027ctl00$PageContent$woMaint$tbxLoanType\\\u0027,\\\u0027\\\u0027)\", 0)","_skin":"WebBlue","clientStateFieldID":"ctl00_PageContent_woMaint_tbxLoanType_ClientState","enabled":true,"styles":{HoveredStyle: ["width:80px;", "riTextBox riHover"],InvalidStyle: ["width:80px;", "riTextBox riError"],DisabledStyle: ["width:80px;", "riTextBox riDisabled"],FocusedStyle: ["width:80px;", "riTextBox riFocused"],EmptyMessageStyle: ["width:80px;", "riTextBox riEmpty"],ReadOnlyStyle: ["width:80px;", "riTextBox riRead readonly"],EnabledStyle: ["width:80px;", "riTextBox riEnabled"]}}, null, null, $get("ctl00_PageContent_woMaint_tbxLoanType"));
});
We have an ASP.NET page with a lot of Rad controls including (Textboxes, Lists, comboboxes) and a RadGrid. I'm trying to improve the performance of the page and currently about 35% of the page size is occupied by the script blocks of Rad controls. Example of the javascript statements are mentioned below and these get repeated for each control. I'm guessing that this gets generated on-the-fly when the control is spitted out to HTML.
Is there a way one could compress/minimize the javascript code on the page? Any help/suggestions would be appreciated.
------------Example Javascript function calls on the page ----------
Sys.Application.add_init(function() {
$create(Telerik.Web.UI.RadTextBox, {"_focused":false,"_postBackEventReferenceScript":"setTimeout(\"__doPostBack(\\\u0027ctl00$PageContent$woMaint$tbxRateSchedule\\\u0027,\\\u0027\\\u0027)\", 0)","_skin":"WebBlue","clientStateFieldID":"ctl00_PageContent_woMaint_tbxRateSchedule_ClientState","enabled":true,"styles":{HoveredStyle: ["width:50%;", "riTextBox riHover"],InvalidStyle: ["width:50%;", "riTextBox riError"],DisabledStyle: ["width:50%;", "riTextBox riDisabled"],FocusedStyle: ["width:50%;", "riTextBox riFocused"],EmptyMessageStyle: ["width:50%;", "riTextBox riEmpty"],ReadOnlyStyle: ["width:50%;", "riTextBox riRead readonly"],EnabledStyle: ["width:50%;", "riTextBox riEnabled"]}}, null, null, $get("ctl00_PageContent_woMaint_tbxRateSchedule"));
});
Sys.Application.add_init(function() {
$create(Telerik.Web.UI.RadTextBox, {"_focused":false,"_postBackEventReferenceScript":"setTimeout(\"__doPostBack(\\\u0027ctl00$PageContent$woMaint$tbxLoanType\\\u0027,\\\u0027\\\u0027)\", 0)","_skin":"WebBlue","clientStateFieldID":"ctl00_PageContent_woMaint_tbxLoanType_ClientState","enabled":true,"styles":{HoveredStyle: ["width:80px;", "riTextBox riHover"],InvalidStyle: ["width:80px;", "riTextBox riError"],DisabledStyle: ["width:80px;", "riTextBox riDisabled"],FocusedStyle: ["width:80px;", "riTextBox riFocused"],EmptyMessageStyle: ["width:80px;", "riTextBox riEmpty"],ReadOnlyStyle: ["width:80px;", "riTextBox riRead readonly"],EnabledStyle: ["width:80px;", "riTextBox riEnabled"]}}, null, null, $get("ctl00_PageContent_woMaint_tbxLoanType"));
});