AjaxControlToolkit没有通过WebResource.axd加载css导致ajaxToolkit:TabPanel无法显示正确的样式
https://stackoverflow.com/questions/3318092/what-is-webresource-axd
WebResource.axd provides access to embedded resources within a project. It's a handler that enables control and page developers to download resources that are embedded in an assembly to the end user.
You include WebResources in your AssemblyInfo:
[assembly: System.Web.UI.WebResource("Project.Styles.Main.css", "text/css")]
Then you can get an include path for your Page using the following code:
string includeLocation = Page.ClientScript.GetWebResourceUrl(this.GetType(),
"Project.Styles.Main.css");
Then to add the above file (which is a CSS file in this case):
LiteralControl include = new LiteralControl(
String.Format(includeTemplate, includeLocation));
((System.Web.UI.HtmlControls.HtmlHead)Page.Header).Controls.Add(include);
Then you'll end up seeing references within your page source such as the following:
/WebResource.axd?d=PhPk80h_UWEcbheb-NHNP5WshV_47UOpWqAOl1_li
UFfN4cNofL74cFlQ1fvpFSf0&t=632573240669964903
https://github.com/DevExpress/AjaxControlToolkit/wiki/How-to-use-bundling-and-CDN
To disable bundling:
- remove ScriptReference from ScriptManager
- remove the Style.Render expression from the element
- in the “ajaxControlToolkit” config section (Web.config), set the “renderStyleLinks” attribute to “true”, and the “useStaticResources” attribute to “false”
只需要将renderStyleLinks设置为true就可以,另外一个attribute默认就是false
AjaxControlToolkit没有通过WebResource.axd加载css导致ajaxToolkit:TabPanel无法显示正确的样式的更多相关文章
- JQuery 加载 CSS、JS 文件
JS 方式加载 CSS.JS 文件: //加载 css 文件 function includeCss(filename) { var head = document.getElementsByTagN ...
- CI模板加载css和js
1.需求 ci无法加载css和js文件. 2.解决 删除..htaccess文件. 在config目录下配置base_url,并传给页面 $base_url = $this->config-&g ...
- webpack模块加载css文件及图片地址
webpack支持css文件加载并打包,只需安装相应加载器并在配置文件中配置 . 加载的css文件内容会与该模块里的js内容混合封装,这样做的好处是一个js文件包含了所有的css与js内容,有效减少了 ...
- [AngularJS] 使用AngularCSS动态加载CSS
[AngularJS] 使用AngularCSS动态加载CSS 前言 使用AngularAMD动态加载Controller 使用AngularAMD动态加载Service 上列两篇文章里,介绍了如何如 ...
- yii2 如何在页面底部加载css和js
作者:白狼 出处:www.manks.top/article/yii2_load_js_css_in_end 本文版权归作者,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接 ...
- 用JavaScript动态加载CSS和JS文件
本文转载自:http://www.cnblogs.com/xiaochaohuashengmi/archive/2011/11/14/2248451.html 今天项目中需要用到动态加载 CSS 文件 ...
- 网站加载css/js/img等静态文件失败
网站加载css/js/img等静态文件失败,报网站http服务器内部500错误.而服务器中静态文件存在且权限正常. 从浏览器中直接访问文件,出来乱码.这种问题原因在于iis中该网站mime配置报错,不 ...
- 加载 CSS 时不影响页面渲染
转自:http://www.oschina.net/translate/loading-css-without-blocking-render 本文展示了一种技术,它能通过异步下载样式表,以阻止它们的 ...
- ruby -- 进阶学习(十一)配置解决production环境下无法加载css或js
最近配置production环境,找了好几份文档,从傻逼到苦逼~~终于配置成功~~@_@!!! 首先,先加载以下几个插件: # Use Uglifier as compressor for JavaS ...
随机推荐
- xml和数组互转
/** * 输出xml字符 * @param $params 参数名称 * return string 返回组装的xml **/ public function data_to_xml( $param ...
- day2之爬取拉勾网
认证流程 浏览器清空cookies 步骤一 访问拉勾网网站 https://www.lagou.com/ 做了些什么: 以get方式请求"https://www.lagou.com/&qu ...
- Nk 1430 Fibonacci(二分矩阵乘幂)
AC代码: #include<iostream> using namespace std; ][]; ][]; ][]; ][]; void binary(int n) { int i,j ...
- curl模拟安卓手机进行网络请求
$url = "http://somedomain/ver/ffffffff-e31e-85d5-ffff-ffffa6220605/2/en/b0:79:94:e7:99:4a/3.5&q ...
- Strom运行监控
https://blog.csdn.net/wenxuechaozhe/article/details/80548709
- MFC中的几种播放声音的方法
一.播放声音文件的简单方法 在VC++ 中的多媒体动态连接库中提供了一组与音频设备有关的函数.利用这些函数可以方便地播放声音.最简单的播放声音方法就是直接调用VC++中提供的声音播放函 数BOOL s ...
- 管理weblogic服务的启动和停止
2012-11-10 12:58 26036人阅读 评论(4) 收藏 举报 分类: WebLogic(10) 版权声明:本文为博主原创文章,未经博主允许不得转载. 目录(?)[+] 介绍 Weblog ...
- [Cypress] install, configure, and script Cypress for JavaScript web applications -- part1
Despite the fact that Cypress is an application that runs natively on your machine, you can install ...
- iPhone 适配之路
(1)1x时代 2007年,初代iPhone公布,屏幕的宽高是320*480像素.这个分辨率一直到iPhone3GS也保持不变. 那时编写iOS的App应用程序.仅仅支持绝对定位. 比方一个butto ...
- 【软件project】菜鸟俯瞰软件project
[背景]初次接触软件project,对软件project不是彻底的了解.但学完一遍软件project,我还是有些感触的. 以下我就对我这阶段的软工学习和理解做一下小小的总结,如有不妥之处.欢迎指正. ...