i've used third party controls (devexpress) for my webApp, at runTime it load a big css file (dxr.axd) which makes slow down page loading. To reduce size of dxr.axd devexpress recommand load some specific css style which needed. i found this
link which used this syntax :
Yes, I don't think you can use Razor HTML heplers in WebForms pages.
Looking at
this answer in their forum, however hints that all this helpers do is generate HTTP requests to
/DXR.axd?r=1_171,1_131,1_94,1_164,…
So, given I don't know your exact environment one way to move forward () would be to:
make an MVC project,
use the @Html helpers there to craft correct request strings (you will have two: for javascript and CSS)
add <script> tag to your pages: <script src="DXR.axd?r=...." type="text/javascript"></script>
add <link> tag to your pages: <link href="DXR.axd?r=...." rel="stylesheet" type="text/css">
You could also have a look through their API reference and make an educated guess which enum values will correspond to your required ExtensionSuites and
ExtensionTypes
My suggestion was to temporarily create a new blank MVC project just so you could grab the full request URLs. Then you would bring these URLs into WebForms project as
<script> and <link> tags.
After you've done that there'd be no need in MVC project and you can delete it. Does it make sense?
I'm not claiming this is a perfect solution - I'm only suggesting it as a way to unblock yourself and move on while waiting for someone else to come around and give you a DevExpress-endorsed one.
.NET forums are moving to a new home on Microsoft Q&A, we encourage you to go to Microsoft Q&A for .NET for posting new questions and get involved today.
Member
35 Points
270 Posts
Problem with Page load performance : some css is too large!!
Mar 25, 2020 12:17 PM|hamed_1983|LINK
Hi
i've used third party controls (devexpress) for my webApp, at runTime it load a big css file (dxr.axd) which makes slow down page loading. To reduce size of dxr.axd devexpress recommand load some specific css style which needed. i found this link which used this syntax :
but i think it works for mvc whereas i'm using webForm.
My question is that how to use it in my webform project to reduce size of dxr.axd ?
Thanks in advance
Member
160 Points
96 Posts
Re: Problem with Page load performance : some css is too large!!
Mar 25, 2020 04:52 PM|timur.kh|LINK
Yes, I don't think you can use Razor HTML heplers in WebForms pages.
Looking at this answer in their forum, however hints that all this helpers do is generate HTTP requests to /DXR.axd?r=1_171,1_131,1_94,1_164,…
So, given I don't know your exact environment one way to move forward () would be to:
You could also have a look through their API reference and make an educated guess which enum values will correspond to your required ExtensionSuites and ExtensionTypes
See the following documentation pages on DevExpress for some more context:
https://supportcenter.devexpress.com/ticket/details/q577855/dxr-axd-size-and-loading-time-are-too-large
https://docs.devexpress.com/AspNet/6913/common-concepts/webconfig-modifications/webconfig-options/resource-compression
https://docs.devexpress.com/AspNet/11878/common-concepts/performance-optimization/how-to-merge-and-compress-custom-css-and-javascript-files
Member
35 Points
270 Posts
Re: Problem with Page load performance : some css is too large!!
Mar 25, 2020 07:38 PM|hamed_1983|LINK
Thanks for reply
I saw your links before, but could not help me, because all of them is MVC.
I'm looking for a way for webforms.
Do you have any idea in webforms?
Thanks in advance
Member
160 Points
96 Posts
Re: Problem with Page load performance : some css is too large!!
Mar 25, 2020 07:47 PM|timur.kh|LINK
My suggestion was to temporarily create a new blank MVC project just so you could grab the full request URLs. Then you would bring these URLs into WebForms project as <script> and <link> tags.
After you've done that there'd be no need in MVC project and you can delete it. Does it make sense?
I'm not claiming this is a perfect solution - I'm only suggesting it as a way to unblock yourself and move on while waiting for someone else to come around and give you a DevExpress-endorsed one.
Contributor
5961 Points
2466 Posts
Re: Problem with Page load performance : some css is too large!!
Mar 26, 2020 12:47 AM|KathyW|LINK
https://supportcenter.devexpress.com/Ticket/Details/T197668/asp-net-dxr-axd-file-is-too-large-how-to-optimize-devexpress-client-resources
That page discusses both MVC and Webforms options. Their forum is the place to ask if anything is unclear.
Member
35 Points
270 Posts
Re: Problem with Page load performance : some css is too large!!
Mar 26, 2020 02:55 PM|hamed_1983|LINK
Thanks KathyW
Yes, That link give some solutions, but that one which i'm looking for (Number 3) is just for MVC project, not working in webForms!
Contributor
5961 Points
2466 Posts
Re: Problem with Page load performance : some css is too large!!
Mar 26, 2020 05:49 PM|KathyW|LINK
Read the whole page. It includes solutions for Webforms.
Member
35 Points
270 Posts
Re: Problem with Page load performance : some css is too large!!
Mar 27, 2020 06:53 AM|hamed_1983|LINK
Thanks KathyW
I've review that page multiple times, but didn't found what i'm looking for! Can u give me more description or example ?
thanks in advance
Contributor
3730 Points
1412 Posts
Re: Problem with Page load performance : some css is too large!!
Mar 27, 2020 09:42 AM|yij sun|LINK
Hi hamed_1983,
As far as I think,you could use the ASPxScriptManager and ASPxStyleSheetManager controls on webform to manage what resource should be loaded.
More details,you could refer to below article:
https://github.com/DevExpress-Examples/how-to-specify-the-position-of-a-link-to-devexpress-aspnet-controls-style-sheets-e4678/blob/14.2.3%2B/CS/WebSite/Default.aspx
Best regards,
Yijing Sun
Contributor
5961 Points
2466 Posts
Re: Problem with Page load performance : some css is too large!!
Mar 27, 2020 02:38 PM|KathyW|LINK
In the middle of the page:
"In ASP.NET WebForms, only the required (common and control-specific) resources are registered in page markup by default. However, if you wish to manually manage what resource should be loaded, you can use the ASPxScriptManager and ASPxStyleSheetManager controls on a page. The E4678: How to specify the position of a link to DevExpress ASP.NET controls' style sheets example demonstrates how to use these components."
Follow the links for more info.