亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? editconfig.aspx.cs

?? 突破ASP.NET編程實例五十講源碼
?? CS
字號:
namespace XmlSerialization.Client {
	using System;
	using System.ComponentModel;
	using System.Drawing;
	using System.Web;
	using System.Web.UI;
	using System.Web.UI.WebControls;
	using System.Web.UI.HtmlControls;
	using Config.Web.Serialization;

	/// <summary>
	///	簡要描述 EditConfiguration.
	/// </summary>
	public class EditConfiguration : System.Web.UI.Page {
		protected Label lblGlobalizationResponse;
		protected Button btnEditGlobalization;
		protected TextBox txtGlobalizationResponse;
		protected TextBox txtGlobalizationRequest;
		protected LinkButton lnkShowAllGlobalization;
		protected Button btnEditSessionState;
		protected TextBox txtSessionStateStateConnectionString;
		protected DropDownList ddSessionStateCookieless;
		protected TextBox txtSessionStateSqlConnectionString;
		protected DropDownList ddSessionStateMode;
		protected Button btnEditTrace;
		protected DropDownList ddTraceMode;
		protected DropDownList ddTracePageOutput;
		protected TextBox txtTraceRequestLimit;
		protected DropDownList ddTraceEnabled;
		protected LinkButton lnkShowAllTrace;
		protected Button btnEditAuthentication;
		protected DropDownList ddAuthentication;
		protected LinkButton lnkShowAllAuth;
		protected Button btnEditCustomErrors;
		protected DropDownList ddCustomErrors;
		protected LinkButton lnkShowAllCE;
		protected Button btnEditCompilation;
		protected LinkButton lnkShowAllCompilation;
		protected Label lblGlobalizationRequest;
		protected LinkButton lnkEditGlobalization;
		protected Label lblSessionStateSqlConnectionString;
		protected Label lblSesionStateTimeout;
		protected Label lblSessionStateCookieless;
		protected Label lblSessionStateStateConnectionString;
		protected Label lblSessionStateMode;
		protected Label lblTraceMode;
		protected Label lblTracePageOutput;
		protected Label lblTraceRequestLimit;
		protected Label lblTraceEnabled;
		protected LinkButton lnkEditTrace;
		protected Label lblAuthenticationMode;
		protected LinkButton lnkEditAuthentication;
		protected Label lblCustomErrorsMode;
		protected LinkButton lnkEditCustomErrors;
		protected Label lblCompilationDebug;
		protected LinkButton lnkEditCompilation;
		protected Panel pnlGlobalization;
		protected Panel pnlSessionState;
		protected Panel pnlTrace;
		protected Panel pnlAuthentication;
		protected Panel pnlCustomErrors;
		protected Panel pnlCompilation;
		protected Panel pnlAll;
		protected LinkButton lnk;
		protected LinkButton lnkEdit;
		protected TextBox txtSessionStateTimeout;
		protected LinkButton lblEditSessionState;
		protected LinkButton lnkShowAllSessionState;
		protected DropDownList ddCompilationDebug;
		protected Label lblCompilationDefaultLanguage;
		protected DropDownList ddCompilationDefaultLanguage;
		private string filePath = "";
	
		public EditConfiguration() {
			Page.Init += new System.EventHandler(Page_Init);
		}

		protected void Page_Init(object sender, EventArgs e) {
		//組件初始化
			InitializeComponent();
		}

		
		private void InitializeComponent() {
			this.lnkEditCompilation.Click += new System.EventHandler(this.lnkEditCompilation_Click);
			this.lnkEditCustomErrors.Click += new System.EventHandler(this.lnkEditCustomErrors_Click);
			this.lnkEditAuthentication.Click += new System.EventHandler(this.lnkEditAuthentication_Click);
			this.lnkEditTrace.Click += new System.EventHandler(this.lnkEditTrace_Click);
			this.lblEditSessionState.Click += new System.EventHandler(this.lblEditSessionState_Click);
			this.lnkEditGlobalization.Click += new System.EventHandler(this.lnkEditGlobalization_Click);
			this.lnkShowAllCompilation.Click += new System.EventHandler(this.lnkShowAllCompilation_Click);
			this.btnEditCompilation.Click += new System.EventHandler(this.btnEditCompilation_Click);
			this.lnkShowAllCE.Click += new System.EventHandler(this.lnkShowAllCE_Click);
			this.btnEditCustomErrors.Click += new System.EventHandler(this.btnEditCustomErrors_Click);
			this.lnkShowAllAuth.Click += new System.EventHandler(this.lnkShowAllAuth_Click);
			this.btnEditAuthentication.Click += new System.EventHandler(this.btnEditAuthentication_Click);
			this.lnkShowAllTrace.Click += new System.EventHandler(this.lnkShowAllTrace_Click);
			this.btnEditTrace.Click += new System.EventHandler(this.btnEditTrace_Click);
			this.lnkShowAllSessionState.Click += new System.EventHandler(this.lnkShowAllSessionState_Click);
			this.btnEditSessionState.Click += new System.EventHandler(this.btnEditSessionState_Click);
			this.lnkShowAllGlobalization.Click += new System.EventHandler(this.lnkShowAllGlobalization_Click);
			this.btnEditGlobalization.Click += new System.EventHandler(this.btnEditGlobalization_Click);
			this.Load += new System.EventHandler(this.Page_Load);

		}

		public void lnkShowAllGlobalization_Click (object sender, System.EventArgs e) {
			this.pnlGlobalization.Visible = false;
			this.pnlAll.Visible = true;
		}

		public void lnkShowAllSessionState_Click (object sender, System.EventArgs e) {

			this.pnlSessionState.Visible = false;
			this.pnlAll.Visible = true;
		}


		public void lnkShowAllTrace_Click (object sender, System.EventArgs e) {
			this.pnlTrace.Visible = false;
			this.pnlAll.Visible = true;
		}


		public void lnkShowAllCompilation_Click(object sender, System.EventArgs e) {
			this.pnlCompilation.Visible = false;
			this.pnlAll.Visible = true;
		}

		public void lnkShowAllCE_Click (object sender, System.EventArgs e) {
			this.pnlCustomErrors.Visible = false;
			this.pnlAll.Visible = true;
		}

		public void lnkShowAllAuth_Click (object sender, System.EventArgs e) {
			this.pnlAuthentication.Visible = false;
			this.pnlAll.Visible = true;
		}

		public void btnEditCompilation_Click(object sender, System.EventArgs e) {
			Configuration cs = ConfigSerialization.LoadConfig(filePath);
			SystemWeb systemWeb = cs.SystemWeb;
			Compilation comp = systemWeb.Compilation;
			comp.DefaultLanguage = this.ddCompilationDefaultLanguage.SelectedItem.Text;
			comp.Debug = System.Convert.ToBoolean(ddCompilationDebug.SelectedItem.Value);
			systemWeb.Compilation = comp;
			ConfigSerialization.PersistConfig(cs,filePath);
			this.FillControls();
			this.pnlCompilation.Visible = false;
			this.pnlAll.Visible = true;
		}

		public void btnEditAuthentication_Click (object sender, System.EventArgs e) {
			Configuration cs = ConfigSerialization.LoadConfig(filePath);
			SystemWeb systemWeb = cs.SystemWeb;
			Authentication auth = systemWeb.Authentication;
			auth.Mode = this.ddAuthentication.SelectedItem.Value;
			systemWeb.Authentication = auth;
			ConfigSerialization.PersistConfig(cs,filePath);
			this.FillControls();
			this.pnlAuthentication.Visible = false;
			this.pnlAll.Visible = true;
		}

		public void btnEditCustomErrors_Click (object sender, System.EventArgs e) {
			Configuration cs = ConfigSerialization.LoadConfig(filePath);
			SystemWeb systemWeb = cs.SystemWeb;
			CustomErrors custErrors = systemWeb.CustomErrors;
			custErrors.Mode = this.ddCustomErrors.SelectedItem.Value;
			systemWeb.CustomErrors = custErrors;
			ConfigSerialization.PersistConfig(cs,filePath);
			this.FillControls();
			this.pnlCustomErrors.Visible = false;
			this.pnlAll.Visible = true;
		}

		public void btnEditTrace_Click (object sender, System.EventArgs e) {
			Configuration cs = ConfigSerialization.LoadConfig(filePath);
			SystemWeb systemWeb = cs.SystemWeb;
			Trace trace = systemWeb.Trace;
			trace.Enabled = Convert.ToBoolean(this.ddTraceEnabled.SelectedItem.Value);
			trace.RequestLimit = Convert.ToInt32(this.txtTraceRequestLimit.Text);
			trace.PageOutput = Convert.ToBoolean(this.ddTracePageOutput.SelectedItem.Value);
			trace.TraceMode = this.ddTraceMode.SelectedItem.Text;
			systemWeb.Trace = trace;
			ConfigSerialization.PersistConfig(cs,filePath);
			this.FillControls();
			this.pnlTrace.Visible = false;
			this.pnlAll.Visible = true;
		}

		public void btnEditSessionState_Click (object sender, System.EventArgs e) {
			Configuration cs = ConfigSerialization.LoadConfig(filePath);
			SystemWeb systemWeb = cs.SystemWeb;
			SessionState state = systemWeb.SessionState;
			state.Mode = this.ddSessionStateMode.SelectedItem.Value;
			state.StateConnectionString = this.txtSessionStateStateConnectionString.Text;
			state.Cookieless = Convert.ToBoolean(this.ddSessionStateCookieless.SelectedItem.Value);
			state.Timeout = Convert.ToInt32(this.txtSessionStateTimeout.Text);
			state.SqlConnectionString = this.txtSessionStateSqlConnectionString.Text;
			systemWeb.SessionState = state;
			ConfigSerialization.PersistConfig(cs,filePath);
			this.FillControls();
			this.pnlSessionState.Visible = false;
			this.pnlAll.Visible = true;
		}

		public void btnEditGlobalization_Click (object sender, System.EventArgs e) {
			Configuration cs = ConfigSerialization.LoadConfig(filePath);
			SystemWeb systemWeb = cs.SystemWeb;
			Globalization glob = systemWeb.Globalization;
			glob.RequestEncoding = this.txtGlobalizationRequest.Text;
			glob.ResponseEncoding = this.txtGlobalizationResponse.Text;
			systemWeb.Globalization = glob;
			ConfigSerialization.PersistConfig(cs,filePath);
			this.FillControls();
			this.pnlGlobalization.Visible = false;
			this.pnlAll.Visible = true;
		}
		private void Page_Load(object sender, System.EventArgs e) {
			this.filePath = this.Server.MapPath("configTest.xml");
			this.FillControls();
		}
		private void FillControls() {
			Configuration cs = ConfigSerialization.LoadConfig(filePath);
			SystemWeb systemWeb = cs.SystemWeb;
			this.lblCompilationDebug.Text = systemWeb.Compilation.Debug.ToString();
			this.lblCompilationDefaultLanguage.Text = systemWeb.Compilation.DefaultLanguage;
			this.lblCustomErrorsMode.Text = systemWeb.CustomErrors.Mode;
			this.lblAuthenticationMode.Text = systemWeb.Authentication.Mode;
			//Trace
			Trace trace = systemWeb.Trace;
			this.lblTraceEnabled.Text = trace.Enabled.ToString();
			this.lblTraceRequestLimit.Text = trace.RequestLimit.ToString();
			this.lblTracePageOutput.Text = trace.PageOutput.ToString();
			this.lblTraceMode.Text = trace.TraceMode;
			//Session State
			SessionState state = systemWeb.SessionState;
			//Inproc
			this.lblSessionStateMode.Text = state.Mode.ToString();
			//使用 SQL Server			
			this.lblSessionStateStateConnectionString.Text = state.StateConnectionString.ToString();
			//Cookieless
			this.lblSessionStateCookieless.Text = state.Cookieless.ToString();
			//Timeout
			this.lblSesionStateTimeout.Text = state.Timeout.ToString();
			//Server
			this.lblSessionStateSqlConnectionString.Text = state.SqlConnectionString;

			//Globalization
			Globalization glob = systemWeb.Globalization;
			this.lblGlobalizationRequest.Text = glob.RequestEncoding;
			this.lblGlobalizationResponse.Text = glob.ResponseEncoding;
		}

		protected void lnkEditCompilation_Click(object sender, System.EventArgs e) {
			Configuration cs = ConfigSerialization.LoadConfig(this.filePath);
			string lang = cs.SystemWeb.Compilation.DefaultLanguage;
			DropDownList dd = this.ddCompilationDefaultLanguage;
			dd.SelectedIndex = GetIndex(lang,dd);
			bool debug = cs.SystemWeb.Compilation.Debug;
			if (debug) {
				this.ddCompilationDebug.SelectedIndex = 0;
			} else {
				this.ddCompilationDebug.SelectedIndex = 1;
			}
			this.pnlAll.Visible = false;
			this.pnlCompilation.Visible = true;
		}

		private int GetIndex(string lang,DropDownList dropDown) {
			int itemCount = dropDown.Items.Count;
			for (int i=0;i<itemCount;i++) {
				if (dropDown.Items[i].Value.ToUpper() == lang.ToUpper()) {					
					return i;
				}
			}
			return 0;
		}

		public void lnkEditCustomErrors_Click (object sender, System.EventArgs e) {
			Configuration cs = ConfigSerialization.LoadConfig(this.filePath);
			string mode = cs.SystemWeb.CustomErrors.Mode;
			if (mode.ToUpper() == "OFF") {
				this.ddCustomErrors.SelectedIndex = 0;
			} else {
				this.ddCustomErrors.SelectedIndex = 1;
			}
			this.pnlAll.Visible = false;
			this.pnlCustomErrors.Visible = true;
		}
		public void lnkEditAuthentication_Click (object sender, System.EventArgs e) {
			Configuration cs = ConfigSerialization.LoadConfig(this.filePath);
			string mode = cs.SystemWeb.Authentication.Mode;
			if (mode.ToUpper() == "NONE") {
				this.ddAuthentication.SelectedIndex = 0;
			} else if (mode.ToUpper() == "WINDOWS") {
				this.ddAuthentication.SelectedIndex = 1;
			} else if (mode.ToUpper() == "COOKIE"){
				this.ddAuthentication.SelectedIndex = 2;
			} else if (mode.ToUpper() == "PASSPORT"){
				this.ddAuthentication.SelectedIndex = 3;
			}
			this.pnlAll.Visible = false;
			this.pnlAuthentication.Visible = true;
		}
		public void lnkEditTrace_Click (object sender, System.EventArgs e) {
			Configuration cs = ConfigSerialization.LoadConfig(this.filePath);
			Trace trace = cs.SystemWeb.Trace;
			//trace 可用
			if (trace.Enabled) {
				this.ddTraceEnabled.SelectedIndex = 0;
			} else {
				this.ddTraceEnabled.SelectedIndex = 1;
			}
			//Request Limit
			this.txtTraceRequestLimit.Text = trace.RequestLimit.ToString();
			//Page Output
			if (trace.PageOutput) {
				this.ddTracePageOutput.SelectedIndex = 0;
			} else {
				this.ddTracePageOutput.SelectedIndex = 1;
			}
			//Trace Mode
			if (trace.TraceMode.ToUpper() == "DEFAULT")	{
				this.ddTraceMode.SelectedIndex = 0;
			} else if (trace.TraceMode.ToUpper() == "SORTBYCATEGORY") {				
				this.ddTraceMode.SelectedIndex = 1;
			} else if (trace.TraceMode.ToUpper() == "SORTBYTIME") {
				this.ddTraceMode.SelectedIndex = 2;
			}
			this.pnlAll.Visible = false;
			this.pnlTrace.Visible = true;
		}
		public void lblEditSessionState_Click (object sender, System.EventArgs e) {
			Configuration cs = ConfigSerialization.LoadConfig(this.filePath);
			SessionState state = cs.SystemWeb.SessionState;
			//Mode
			string mode = state.Mode;
			DropDownList dd = this.ddSessionStateMode;
			dd.SelectedIndex = GetIndex(mode,dd);
			//Cookieless
			if (state.Cookieless)	{
				this.ddSessionStateCookieless.SelectedIndex = 0;
			} else 	{
				this.ddSessionStateCookieless.SelectedIndex = 1;
			}
			//Timeout
			this.txtSessionStateTimeout.Text = state.Timeout.ToString();
			this.txtSessionStateSqlConnectionString.Text = state.SqlConnectionString;
     		this.txtSessionStateStateConnectionString.Text = state.StateConnectionString.ToString();
			this.pnlAll.Visible = false;
			this.pnlSessionState.Visible = true;

		}
		public void lnkEditGlobalization_Click (object sender, System.EventArgs e) {
			Configuration cs = ConfigSerialization.LoadConfig(this.filePath);
			Globalization glob = cs.SystemWeb.Globalization;
			this.txtGlobalizationRequest.Text = glob.RequestEncoding;
			this.txtGlobalizationResponse.Text = glob.ResponseEncoding;
			this.pnlAll.Visible = false;
			this.pnlGlobalization.Visible = true;
		}
	}
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲综合免费观看高清完整版在线 | 亚洲综合精品久久| 91精选在线观看| 暴力调教一区二区三区| 青青草原综合久久大伊人精品| 日本一区二区三区在线不卡| 欧美日韩高清一区二区| 97se亚洲国产综合自在线观| 激情五月播播久久久精品| 亚洲午夜精品网| 中文字幕成人网| 精品久久国产字幕高潮| 欧美美女直播网站| 欧美精品久久99久久在免费线| 99热这里都是精品| 国产麻豆9l精品三级站| 久久精品国产一区二区三| 亚洲一区二区三区四区不卡| 国产精品成人免费在线| 久久久蜜桃精品| 欧美电影免费观看完整版| 欧美精品vⅰdeose4hd| 欧美图片一区二区三区| 一本久久精品一区二区| aaa亚洲精品| 成人av电影在线| 欧美日韩电影在线| 91国产丝袜在线播放| 99re在线视频这里只有精品| 国产精品99久久久久久宅男| 久久精品免费观看| 免费在线视频一区| 日av在线不卡| 蜜臀久久久99精品久久久久久| 午夜伦理一区二区| 视频一区在线播放| 午夜不卡av在线| 三级成人在线视频| 日韩成人午夜电影| 久久er99精品| 韩国欧美国产1区| 国产精品一区在线观看乱码| 国产精品一区在线| 国产999精品久久久久久绿帽| 懂色av中文字幕一区二区三区| 国产成人午夜99999| 成人激情黄色小说| 色天天综合色天天久久| 在线观看日韩电影| 欧美一区二区精美| 精品粉嫩超白一线天av| 国产午夜精品一区二区三区嫩草| 国产日韩欧美在线一区| 中文字幕一区二区5566日韩| 亚洲另类在线制服丝袜| 亚洲成人高清在线| 激情成人综合网| 丁香桃色午夜亚洲一区二区三区| 99久久精品情趣| 精品视频在线视频| 精品精品欲导航| 国产精品你懂的在线| 一区二区三区免费观看| 五月天欧美精品| 国产老妇另类xxxxx| 97se狠狠狠综合亚洲狠狠| 欧美色图天堂网| 亚洲精品一区二区三区香蕉| 欧美国产日韩精品免费观看| 亚洲一区二区中文在线| 久久99国产精品久久| 成人动漫在线一区| 91精品国产91热久久久做人人| 久久综合色8888| 亚洲影视资源网| 国模无码大尺度一区二区三区| 成人国产精品视频| 91麻豆精品91久久久久同性| 国产精品系列在线| 欧美大黄免费观看| 精品国产人成亚洲区| 1024国产精品| 久久国产婷婷国产香蕉| a亚洲天堂av| 日韩一区二区三区精品视频| 亚洲国产精品二十页| 手机精品视频在线观看| 成人福利在线看| 日韩精品中文字幕一区| 一区二区三区四区乱视频| 精品亚洲国内自在自线福利| 日本韩国精品在线| 久久久亚洲高清| 日一区二区三区| 99久久国产综合精品色伊| 精品毛片乱码1区2区3区| 一区二区三区四区在线播放 | 欧美日韩午夜在线视频| 久久婷婷国产综合国色天香| 一区二区不卡在线播放| 国产成+人+日韩+欧美+亚洲| 欧美一二三在线| 亚洲精品国产品国语在线app| 国产精品一二三四五| 91精品国产美女浴室洗澡无遮挡| 国产精品进线69影院| 国产一区啦啦啦在线观看| 777久久久精品| 一区二区三区欧美| 91在线国产福利| 欧美国产一区二区在线观看| 开心九九激情九九欧美日韩精美视频电影| 色素色在线综合| 国产精品久久久久久久岛一牛影视| 精一区二区三区| 555www色欧美视频| 亚洲成人av一区| 91香蕉视频黄| 日韩一区有码在线| 成人精品视频一区| 国产欧美日产一区| 国产精品99久久不卡二区| 欧美电影免费观看高清完整版在线观看 | 韩日av一区二区| 91国偷自产一区二区三区观看| 中文字幕一区二区三| www.久久久久久久久| 欧美激情一区二区三区蜜桃视频| 国产中文字幕一区| 日韩一区二区三区av| 免费观看一级欧美片| 欧美本精品男人aⅴ天堂| 麻豆视频一区二区| 日韩视频国产视频| 九九**精品视频免费播放| 久久先锋影音av鲁色资源| 国产精一区二区三区| 国产视频一区在线观看 | 7777女厕盗摄久久久| 丝瓜av网站精品一区二区 | 亚洲丝袜美腿综合| 色综合久久天天| 一区二区三区毛片| 欧美肥妇毛茸茸| 秋霞成人午夜伦在线观看| 欧美一级爆毛片| 国产成人精品亚洲777人妖| 国产精品嫩草久久久久| 91福利在线看| 视频在线观看91| 久久久99精品久久| 99久久精品免费看国产| 亚洲成av人片一区二区三区| 欧美色成人综合| 亚洲欧洲日韩女同| 91啪亚洲精品| 午夜a成v人精品| 精品少妇一区二区| 不卡视频免费播放| 一区二区三区欧美亚洲| 欧美一区二区在线不卡| 国产经典欧美精品| 亚洲欧美一区二区三区极速播放| 欧美日韩日本视频| 国产在线国偷精品产拍免费yy| 国产精品系列在线| 欧美日韩国产大片| 国产精品一二三区| 亚洲人成网站精品片在线观看| 欧美日韩精品二区第二页| 久久97超碰色| 亚洲女厕所小便bbb| 在线综合+亚洲+欧美中文字幕| 国产精品一线二线三线精华| 亚洲欧美韩国综合色| 欧美蜜桃一区二区三区| 成人一区二区三区中文字幕| 亚洲成人www| 亚洲国产精品av| 欧美男人的天堂一二区| 成人黄色免费短视频| 日产国产高清一区二区三区| 国产精品美女久久久久久久网站| 欧美精品一级二级三级| 国产成人免费视频精品含羞草妖精| 一区二区三区成人在线视频| 国产亚洲午夜高清国产拍精品| 欧美视频一区在线观看| 国产麻豆视频精品| 水野朝阳av一区二区三区| 成人欧美一区二区三区1314| 日韩欧美一级二级三级| 色哦色哦哦色天天综合| 国产精品99久久久久久久女警| 日韩国产精品久久| 亚洲女性喷水在线观看一区| 欧美国产日韩亚洲一区| 欧美本精品男人aⅴ天堂| 欧美日韩电影一区| 91在线观看免费视频|