如何将css包括到asp页面 [英] how to include css to asp page

查看:74
本文介绍了如何将css包括到asp页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我有10个单独的ASP页面,但是在每个文件中,我通常对所有页面都包含4个CSS和2个js文件.因此,有什么方法可以将4个CSS和2个js文件放在一起,并在不使用母版页的情况下获得引用..

在此先感谢
Seshu

Hi All,

I have 10 individual asp pages but in each file i am including 4 css and 2 js files commonly to all the pages. so is there any way to put 4 css and 2 js files commonly and getting the reference with out using master page..

Thanks in Advance
Seshu

推荐答案

另一种方法是继承.从基础页面继承所有这些页面,并在该页面的OnLoad中添加对这些JS文件的引用:

http://aspdotnetfaq.com/Faq/How-到以编程方式将JavaScript文件添加到Asp-Net-page.aspx [
Another way is inheritance. Inherit all of those pages from a Base page and in OnLoad of that page add the reference to those JS files :

http://aspdotnetfaq.com/Faq/How-to-Programmatically-add-JavaScript-File-to-Asp-Net-page.aspx[^]

Anyway can you imagine a solution for your question without having a central point ... ?


尝试一下...........

Try it Out..........

<link href="CSS/StyleSheet.css" rel="Stylesheet" type="text/css" />


这篇关于如何将css包括到asp页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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