Script:
<style type="text/css">
.background
{
background-color:Gray;
filter:alpha(opacity=60);
opacity:0.6;
}
</style>
<script type="text/javascript"> 1:
2: function download()
3: {
4: var iframe = document.createElement("iframe");
5: iframe.src = "GenerateFile.aspx";
6: iframe.style.display = "none";
7: document.body.appendChild(iframe);
8: }
</script>
Frank 發表在 痞客邦 留言(0) 人氣(2,275)
private void richTextBox1_TextChanged(object sender, EventArgs e)
{
richTextBox1.SelectionStart = richTextBox1.TextLength;
richTextBox1.ScrollToCaret();
}
Frank 發表在 痞客邦 留言(0) 人氣(8,013)

UseSubmitBehaviot 屬性是控制Button於HTML輸出時Type是否為submit或Button屬性
在ASP.NET的Button控制項中預設是會去執行postback,也就是會在submit時會自動去執行__doPostBack 函式
而如果在Button設定UseSubmitBehaviot=false時,Button必須在onClick事件中自行去呼叫__doPostBack 函式
Frank 發表在 痞客邦 留言(0) 人氣(3,590)
一.由IIS產生Session並給予一組24字元的SessionID
二.在需要回傳資料給伺服器時由瀏覽器將SessionID附加在HTTP訊息標頭中傳回給IIS做為身份辨識,伺服器處理完資料後依照SessionID回傳給個別的Client端
三.Session在Web.config的常用設定
1.在<System.Web>標籤內
< sessionState
mode="Off|InProc|StateServer|SQLServer"
cookieless="true|false"
timeout="number of minutes"
stateConnectionString="tcpip=server:port"
stateNetworkTimeout="number of seconds"
sqlConnectionString="sql connection string"
sqlCommandTimeout ="number of seconds"
/>
ex.
Frank 發表在 痞客邦 留言(0) 人氣(18,372)
using System.Runtime.InteropServices; //使用DllImport public partial class Form1 : Form{ [DllImport("kernel32.dll")] static extern void GetSystemTime(out SYSTEMTIME lpSystemTime); private struct SYSTEMTIME { public ushort wYear; public ushort wMonth; public ushort wDayOfWeek; public ushort wDay; public ushort wHour; public ushort wMinute; public ushort wSecond; public ushort wMilliseconds; } private void GetTime() { // Call the native GetSystemTime method // with the defined structure. SYSTEMTIME stime = new SYSTEMTIME(); GetSystemTime(out stime); // Show the current time. MessageBox.Show("Current Time: " + stime.wHour.ToString() + ":" + stime.wMinute.ToString()); }}
Frank 發表在 痞客邦 留言(0) 人氣(1,850)