日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

net5:Theme主题样式的动态变换,在内容页content中操作影响模板页的操作

發布時間:2025/7/25 编程问答 35 豆豆
生活随笔 收集整理的這篇文章主要介紹了 net5:Theme主题样式的动态变换,在内容页content中操作影响模板页的操作 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

原文發布時間為:2008-07-29 —— 來源于本人的百度文章 [由搬家工具導入]

using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class Default2 : System.Web.UI.Page
{
??? protected void Page_PreInit(object sender, EventArgs e)
??? {
??????? if (Request.QueryString["t"] != null)
??????? {
??????????? Page.Theme = Request.QueryString["t"].ToString();
??????? }
??? }
???
??? protected void Page_Load(object sender, EventArgs e)
??? {

??? }
??? protected void Button1_Click(object sender, EventArgs e)
??? {
??????? Response.Redirect("Default2.aspx?t=blue");
??? }
??? protected void Button2_Click(object sender, EventArgs e)
??? {
??????? Response.Redirect("Default2.aspx?t=red");
??? }
}

---------------------------------------------------------------------------

using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class _Default : System.Web.UI.Page
{
??? protected void Page_Load(object sender, EventArgs e)
??? {

??? }
??? protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
??? {
??????? ((Label)(Master.FindControl("Label1"))).Text = DropDownList1.SelectedValue;
??????? Label1.Text = DropDownList1.SelectedValue;
??? }
}

---------

App_Themes文件夾中的blue文件夾文件SkinFile文件內容如下:

<asp:GridView runat="server" AutoGenerateColumns="False"
??????????? CellPadding="4" DataKeyNames="au_id" ForeColor="#333333"
??????????? GridLines="None">
??????????? <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
??????????? <Columns>
??????????????? <asp:BoundField DataField="au_id" HeaderText="au_id" ReadOnly="True" SortExpression="au_id" />
??????????????? <asp:BoundField DataField="au_lname" HeaderText="au_lname" SortExpression="au_lname" />
??????????????? <asp:BoundField DataField="au_fname" HeaderText="au_fname" SortExpression="au_fname" />
??????????? </Columns>
??????????? <RowStyle BackColor="#EFF3FB" />
??????????? <EditRowStyle BackColor="#2461BF" />
??????????? <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
??????????? <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
??????????? <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
??????????? <AlternatingRowStyle BackColor="White" />
??????? </asp:GridView>
???????
???????
??????? <asp:GridView SkinId="pifu" runat="server" CellPadding="4" ForeColor="#333333" GridLines="None">
??????????? <FooterStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
??????????? <RowStyle BackColor="#FFFBD6" ForeColor="#333333" />
??????????? <SelectedRowStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="Navy" />
??????????? <PagerStyle BackColor="#FFCC66" ForeColor="#333333" HorizontalAlign="Center" />
??????????? <HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
??????????? <AlternatingRowStyle BackColor="White" />
??????? </asp:GridView>
???????
?????? <asp:ListBox runat="server" BackColor="Blue" Font-Bold="True" Font-Italic="True"
??????????? Font-Names="Arial Black">
??????????? <asp:ListItem>fgh</asp:ListItem>
??????????? <asp:ListItem Value="gf">jdf</asp:ListItem>
??????????? <asp:ListItem>dfgh</asp:ListItem>
??????? </asp:ListBox>

StyleSheet文件內容如下:

body
{
color: blue;
font-style: italic;
font-family: 'Arial Black';
background-color: #ff33ff;
}

-----------------------

App_Themes文件夾中的red文件夾文件SkinFile文件內容類似

轉載于:https://www.cnblogs.com/handboy/p/7141607.html

總結

以上是生活随笔為你收集整理的net5:Theme主题样式的动态变换,在内容页content中操作影响模板页的操作的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。