如何在asp.net Web表单中添加样式和脚本 [英] how to add styles and scripts in asp.net web forms

查看:114
本文介绍了如何在asp.net Web表单中添加样式和脚本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在asp.net网络表单中添加样式和脚本

i添加bundleconfig.cs但不能在asp.net webforms中工作

how to add styles and scripts in asp.net web forms
i adding bundleconfig.cs but not working in asp.net webforms

bundles.Add(new ScriptBundle("~/Scripts/Customscripts").Include(
"~/Scripts/tooltrip.js",
"~/Scripts/bootstrap.js",
"~/Scripts/bootstrap.min.js",
"~/Scripts/jquery-{version}.js",
"~/Scripts/jquery-{version}.min.js",
"~/Scripts/jquery-ui.js",
"~/Scripts/jquery-ui.min.js",
"~/Scripts/modernizr-{version}.js",
"~/Scripts/modernizr.custom.js"
));
 
bundles.Add(new StyleBundle("~/Content/Costomtyles").Include(
"~/Content/bootstrap-social.css",
"~/Content/bootstrap-social.less.css",
"~/Content/bootstrap.css",
"~/Content/bootstrap.min.css",
"~/Content/component.css",
"~/Content/default.css",
"~/Content/jquery-ui.css",
"~/Content/jquery-ui.min.css",
"~/Content/jquery-ui.structure.css",
"~/Content/jquery-ui.theme.css",
"~/Content/Site.css",
"~/Content/ValidationEngine.css"
));
 
in home.aspx
<asp:Content ContentPlaceHolderID="customs" runat="server">
<asp:PlaceHolder runat="server">
<%: Scripts.Render("~/Scripts/Customscripts") %>
<%: Styles.Render("~/Content/Costomtyles") %>
</asp:PlaceHolder>
</asp:Content>



但不工作plz帮助我


but not working plz help me

推荐答案

请按照以下链接



http://stackoverflow.com/questions/7444643/asp-net-web-forms-master-page-css-file [ ^ ]



https://msdn.microsoft.com/en-us/library /tbze79kd(v=vs.80).aspx [ ^ ]



HTTP? //forums.asp.net/t/1999098.aspx?How+to+add+a+css+ file + to + a + web + forms + page + that + uses + MasterPage + without + add + the + css + fiel + to + the + MasterPage + [ ^ ]





谢谢

AARIF SHAIKH
Please follow below links

http://stackoverflow.com/questions/7444643/asp-net-web-forms-master-page-css-file[^]

https://msdn.microsoft.com/en-us/library/tbze79kd(v=vs.80).aspx[^]

http://forums.asp.net/t/1999098.aspx?How+to+add+a+css+file+to+a+web+forms+page+that+uses+MasterPage+without+adding+the+css+fiel+to+the+MasterPage+[^]


Thanks
AARIF SHAIKH


这篇关于如何在asp.net Web表单中添加样式和脚本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆