一般存了這樣的值, 是想要轉成如下的資料表去跟其他的資料表做 JOIN 或是透過 WHERE 去濾資料.
FID | MyField |
1 | 001 |
1 | 002 |
1 | 003 |
FID | MyField |
1 | 001 |
1 | 002 |
1 | 003 |
原本以為 Netbeans6.1 跟以前的版本一樣, 要到 Tools –> Options 找 Encoding 的設定, 然後改成 Big5 / UTF-8.
沒想到這一版只要在專案上按滑鼠右鍵 –> Properties –> Source –> 畫面下方就有一個 Encoding 可以選.
如果原本檔案是用 Big5 儲存( Notepad 看到的編碼是 ANSI), 就選 Big5 的 Encoding.
如果是 UTF-8 的編碼, 預設應該就是 UTF-8 , 不用另外改 (簡體中文版例外).
注意: 已經用 Netbeans 開啟的檔案, 要關掉再開一次才會正常顯示
1 2 3 4 5 6 7 8 9 10 11 | if (Session[ "SortDirection" ] == null ) { //因預設是ASC,所以觸發此事件時, 應設定為DESC Session[ "SortDirection" ] = SortDirection.Descending; } else { //ASC<-->DESC(對調) Session[ "SortDirection" ] = (((SortDirection)Session[ "SortDirection" ]) == SortDirection.Ascending) ? SortDirection.Descending : SortDirection.Ascending; } Session[ "SortExpression" ] = e.SortExpression; |
1 2 3 4 | while ( true ) { //SELECT ID, Parent, Name FROM Table1 WHERE Parent=@ID } |
1 2 | Response.Write( "<script type=\"text/javascript\">window.open('./CSV/" + strFileCSVName + "','_blank');</script>;" ); |
1 2 | Response.Write( "<script type=\"text/javascript\">window.open('./CSV/" + strFileCSVName + "','_blank');<" + "/script" + ">" ); |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | string FullFileName = @"c:\tmp\yahoo_logo.gif" ; HttpWebRequest webReq = (HttpWebRequest)WebRequest.Create(Url); //預設TimeOut是30秒 webReq.Timeout = 30000; HttpWebResponse webResp = (HttpWebResponse)webReq.GetResponse(); //檢查儲存的檔案路徑,其目錄是否存在 if (!Directory.Exists(Path.GetDirectoryName(FullFileName))) { //建立目錄 Directory.CreateDirectory(Path.GetDirectoryName(FullFileName)); } using (BinaryReader imgStream = new BinaryReader(webResp.GetResponseStream())) { File.WriteAllBytes(FullFileName, imgStream.ReadBytes(( int )webResp.ContentLength)); } |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | < asp:Button ID = "btnUpdate" runat = "server" Text = "更新" CommandName = "Update" CausesValidation = "false" OnClientClick = "return confirmUpdate();" ValidationGroup = "vgUpdate" /> < asp:TextBox ID = "txtUpdateName" runat = "server" Text = "HelloWorld" ></ asp:TextBox > < asp:RequiredFieldValidator ID = "UpdateNameRequired" runat = "server" ControlToValidate = "txtUpdateName" ToolTip = "必須輸入名稱。" ErrorMessage = "必須輸入名稱。" ValidationGroup = "vgUpdate" >*</ asp:RequiredFieldValidator > |