Notice (8): file_put_contents(): Write of 270 bytes failed with errno=28 No space left on device [CORE/src/Log/Engine/FileLog.php, line 140]

Notice: file_put_contents() [function.file-put-contents]: Write of 1108 bytes failed with errno=28 No space left on device in /www/wwwroot/www.adminso.com/vendor/cakephp/cakephp/src/Log/Engine/FileLog.php on line 140
Notice (8): unserialize() [<a href='https://secure.php.net/function.unserialize'>function.unserialize</a>]: Error at offset 16363 of 16373 bytes [APP/Controller/NewsController.php, line 5571]

Notice: file_put_contents() [function.file-put-contents]: Write of 2755 bytes failed with errno=28 No space left on device in /www/wwwroot/www.adminso.com/vendor/cakephp/cakephp/src/Log/Engine/FileLog.php on line 140
Warning (2): Undefined array key "nsort" [APP/Controller/NewsController.php, line 3613]

Notice: file_put_contents() [function.file-put-contents]: Write of 2069 bytes failed with errno=28 No space left on device in /www/wwwroot/www.adminso.com/vendor/cakephp/cakephp/src/Log/Engine/FileLog.php on line 140
Warning (2): Trying to access array offset on value of type null [APP/Controller/NewsController.php, line 3613]

Notice: file_put_contents() [function.file-put-contents]: Write of 2093 bytes failed with errno=28 No space left on device in /www/wwwroot/www.adminso.com/vendor/cakephp/cakephp/src/Log/Engine/FileLog.php on line 140
Warning (2): Undefined array key "nsort" [APP/Controller/NewsController.php, line 3613]

Notice: file_put_contents() [function.file-put-contents]: Write of 2069 bytes failed with errno=28 No space left on device in /www/wwwroot/www.adminso.com/vendor/cakephp/cakephp/src/Log/Engine/FileLog.php on line 140
Warning (2): Trying to access array offset on value of type null [APP/Controller/NewsController.php, line 3613]

Notice: file_put_contents() [function.file-put-contents]: Write of 2093 bytes failed with errno=28 No space left on device in /www/wwwroot/www.adminso.com/vendor/cakephp/cakephp/src/Log/Engine/FileLog.php on line 140
Notice (8): unserialize() [<a href='https://secure.php.net/function.unserialize'>function.unserialize</a>]: Error at offset 16113 of 16373 bytes [APP/Controller/NewsController.php, line 5571]

Notice: file_put_contents() [function.file-put-contents]: Write of 2392 bytes failed with errno=28 No space left on device in /www/wwwroot/www.adminso.com/vendor/cakephp/cakephp/src/Log/Engine/FileLog.php on line 140
Notice (8): unserialize() [<a href='https://secure.php.net/function.unserialize'>function.unserialize</a>]: Error at offset 4067 of 4085 bytes [APP/Controller/NewsController.php, line 5571]

Notice: file_put_contents() [function.file-put-contents]: Write of 2483 bytes failed with errno=28 No space left on device in /www/wwwroot/www.adminso.com/vendor/cakephp/cakephp/src/Log/Engine/FileLog.php on line 140
Notice (8): unserialize() [<a href='https://secure.php.net/function.unserialize'>function.unserialize</a>]: Error at offset 61409 of 61429 bytes [APP/Controller/NewsController.php, line 5571]

Notice: file_put_contents() [function.file-put-contents]: Write of 2485 bytes failed with errno=28 No space left on device in /www/wwwroot/www.adminso.com/vendor/cakephp/cakephp/src/Log/Engine/FileLog.php on line 140
ASP.Net利用CSS实现多界面的方法 - 站长搜索
首页 > 资讯列表 > 编程/数据库 >>

ASP.Net利用CSS实现多界面的方法

Warning (2): Undefined array key "nsort" [ROOT/plugins/Kuhuang/templates/Websites/view.php, line 430]
Notice: file_put_contents() [function.file-put-contents]: Write of 2417 bytes failed with errno=28 No space left on device in /www/wwwroot/www.adminso.com/vendor/cakephp/cakephp/src/Log/Engine/FileLog.php on line 140
Warning (2): Trying to access array offset on value of type null [ROOT/plugins/Kuhuang/templates/Websites/view.php, line 430]

Notice: file_put_contents() [function.file-put-contents]: Write of 2441 bytes failed with errno=28 No space left on device in /www/wwwroot/www.adminso.com/vendor/cakephp/cakephp/src/Log/Engine/FileLog.php on line 140
">
Warning (2): Undefined array key "nsort" [ROOT/plugins/Kuhuang/templates/Websites/view.php, line 430]

Notice: file_put_contents() [function.file-put-contents]: Write of 2417 bytes failed with errno=28 No space left on device in /www/wwwroot/www.adminso.com/vendor/cakephp/cakephp/src/Log/Engine/FileLog.php on line 140
Warning (2): Trying to access array offset on value of type null [ROOT/plugins/Kuhuang/templates/Websites/view.php, line 430]

Notice: file_put_contents() [function.file-put-contents]: Write of 2441 bytes failed with errno=28 No space left on device in /www/wwwroot/www.adminso.com/vendor/cakephp/cakephp/src/Log/Engine/FileLog.php on line 140
2011-01-05 00:00:00 转载来源: AS网站目录整理

ASP.NET通过使用页面动态加载不同CSS实现多界面。

      ASP.NET通过使用页面动态加载不同CSS实现多界面。

      方法一:

以下是引用片段:
<%@page language="C#"%> 
<%@import namespace="System.Data"%> 
<script language="c#" runat="server"> 
public void page_load(Object obj,EventArgs e) 

//创建服务器端控件. 
//指定的标记"LINK"初始化此类的新实例. 
HtmlGenericControl objLink=new HtmlGenericControl("LINK"); 
objLink.ID=ID; 
objLink.Attributes["rel"]="stylesheet"; 
objLink.Attributes["type"]="text/css"; 
objLink.Attributes["href"]="portal.css"; 
//此控件不产生任何可见输出,仅作为其他控件的容器,可在其中添加,插入或移除控件. 
MyCSS.Controls.Add(objLink); 

</script> 
<html> 
<head> 
<title>c#</title> 
<asp:placeholder id="MyCSS" runat="server"></asp:placeholder> 
</head> 
<body bgColor="#ffcc66" style="FONT:9pt"> 
<form runat="server"> 
</form> 
</body> 
</html> 

  通过动态设置页面所有同类型控件的样式来改变界面;

  方法二:

  可以通过改变WEB控件的CssClass属性,可方便地设置和修改控件的样式。但在实际开发过程中,一个个地设置控件的CssClass属性,非常繁琐,所以此思路应用不广。但下面的代码段演示了一次性改变页面所有同类型控件的样式的方法,可以实现简单的SKIN等功能。

  代码如下:

以下是引用片段:
public void page_load(Object obj,EventArgs e) 

if(!Page.IsPostBack){ 
//为页面的所有控件设置样式. 
SetCSS(Page.Controls); 


private void SetCSS(System.Web.UI.ControlCollection vControls) 

for(int i=0;i<vControls.Count;i++) 

System.Web.UI.Control vControl=vControls[i]; 
//得到控件的类型 
//可增加控件类型及相应处理方法 
string PType=vControl.GetType().Name; 
switch (PType) 

case "TextBox": 
TextBox_CSS ((TextBox) vControl); 
break; 
case "Button": 
//Button_CSS ((Button) vControl); 
break; 
case "DataGrid": 
//DataGrid_CSS ((DataGrid) vControl); 
break; 

if(vControl.Controls.Count>0) 
SetCSS(vControl.Controls); 


private void TextBox_CSS(TextBox tb){ 
tb.CssClass="TextBox_show"; 

<form runat="server"> 
<asp:textbox id="Search1" runat="server"/> 
<asp:textbox id="Search2" CssClass="INPUT" runat="server"/> 
</form>

标签: ASP.Net 利用 CSS 实现 多界 面的 方法


声明:本文内容来源自网络,文字、图片等素材版权属于原作者,平台转载素材出于传递更多信息,文章内容仅供参考与学习,切勿作为商业目的使用。如果侵害了您的合法权益,请您及时与我们联系,我们会在第一时间进行处理!我们尊重版权,也致力于保护版权,站搜网感谢您的分享!

站长搜索

http://www.adminso.com

Copyright @ 2007~2025 All Rights Reserved.

Powered By 站长搜索

打开手机扫描上面的二维码打开手机版


使用手机软件扫描微信二维码

关注我们可获取更多热点资讯

站长搜索目录系统技术支持