b/s切换页面风格怎么做?
b/s切换页面风格怎么做?目前想到的是做两套css文件
还有其他办法吗?
有没有什么webForm能用的第三方控件啊 --------------------编程问答-------------------- 基本想法还是通过CSS来做,不过像这么常用的功能,应该有不少的第三方控件吧。楼主可以去51aspx看下,里面资源比较多。 --------------------编程问答--------------------
我所知道的也是切换css.
友情帮顶。 --------------------编程问答-------------------- 跟我想的也一样,如果只要是该背景色的话,可能容易一点哦!呵呵! --------------------编程问答-------------------- 皮肤样式切换动态修改CSS文件HtmlGenericControl
或
把定义好的theme应用到整个页面:在该页的Page页签里加上属性theme=“theme名称”
把定义好的theme应用到整个站点:在web.config文件system.web的配置节中加上<pages theme="theme名称">
动态的更换站点的样式(主题、皮肤):在Page_PreInit事件中写代码,Page.Theme = "...";
--------------------编程问答--------------------
受教了
也谢谢楼上各位 --------------------编程问答-------------------- <script runat="server">
public void Page_PreInit()
{
// Sets the Theme for the page.
this.Theme = "Blue";
if (Request.Form != null && Request.Form.Count > 0)
this.Theme = this.Request.Form[4].Trim();
}
</script>
为啥这段代码报错
用户代码未处理 System.ArgumentException
Message="“/wEWBQLEoYSIAgLjs9iwBgLc3MHECAKHqsGlCgKhyaGtC/TiY0Oz/uwikUTvq7JCxLIXEqsq”不是一个有效的主题名称。\r\n参数名: Theme"
Source="System.Web"
ParamName="Theme"
StackTrace:
在 System.Web.UI.Page.set_Theme(String value)
在 ASP.home_aspx.Page_PreInit() 位置 c:\Users\Administrator\Documents\Visual Studio 2008\Projects\SuiBianWanWan\SuiBianWanWan\home.aspx:行号 9
在 System.Web.Util.CalliHelper.ArglessFunctionCaller(IntPtr fp, Object o)
在 System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e)
在 System.Web.UI.Page.OnPreInit(EventArgs e)
在 System.Web.UI.Page.PerformPreInit()
在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
InnerException:
补充:.NET技术 , C#