引用System.Web.SessionState與實作IReadOnlySessionState
[ASP.NET & jQuery]使用jQuery的Ajax存取資料(ashx,aspx,asmx) - In 91- 點部落
The Will Will Web | 在 HttpHandler 中使用 Session 的注意事項
標籤
.net
(
17
)
工作
(
29
)
面試
(
2
)
筆記
(
2
)
筆記倉庫
(
1
)
嘸蝦米
(
2
)
繪圖
(
1
)
Add-on
(
4
)
Android
(
39
)
AngularJS
(
1
)
ASP.NET
(
14
)
AutoHotKey
(
20
)
AutoIt
(
3
)
batch
(
24
)
Blogger Hack
(
3
)
Bookmarklet
(
18
)
C#
(
16
)
Chrome
(
1
)
cmd
(
22
)
CSS
(
6
)
CSS3
(
6
)
D855
(
1
)
DOM
(
17
)
DragOnIt
(
5
)
EmEditor
(
1
)
English
(
1
)
ffmpeg
(
1
)
Firefox
(
25
)
flo
(
2
)
GIMP
(
1
)
gist
(
144
)
Graphviz
(
1
)
hardware
(
1
)
HDD
(
1
)
HTML5
(
4
)
i18n
(
1
)
IIS
(
4
)
ImageMagick
(
5
)
Java
(
1
)
JavaScript
(
92
)
jhead
(
1
)
jQuery
(
6
)
JSBin
(
19
)
jsFiddle
(
4
)
JSON
(
1
)
JustDoubleClick
(
1
)
Kindle
(
1
)
MSSQL
(
26
)
MySQL
(
2
)
Network
(
1
)
node.js
(
12
)
php
(
1
)
PowerShell
(
6
)
ramdisk
(
1
)
Reg
(
3
)
RegExp
(
3
)
rpi3
(
3
)
SJ2000
(
1
)
SQLite
(
3
)
SSD
(
1
)
Stylish
(
1
)
SublimeText
(
2
)
tips
(
6
)
userChrome.js
(
3
)
userscript
(
40
)
VB.net
(
9
)
VBScript
(
2
)
VisualStudio
(
2
)
Vue.js
(
3
)
Win
(
5
)
Win2008
(
1
)
Win7
(
29
)
WinAPI
(
1
)
Winform
(
1
)
WinXP
(
3
)
XML
(
1
)
SqlDataSource.Select()
標籤:
ASP.NET
方法1:
SqlDataSource.Select 方法 (System.Web.UI.WebControls)
JHPeng's Blog:宏觀篇。: SqlDataSource抓全部資料
DataView dv = (DataView)SqlDataSource1.Select(DataSourceSelectArguments.Empty);
int reorderedProducts = (int)dv.Table.Rows[0][0];
方法2:
DataView dv = (DataView)SqlDataSource1.Select(DataSourceSelectArguments.Empty);
DataTable dt = dv.ToTable();
foreach (DataRow i in dt.Rows)
{
Response.Write(i["欄位名"].ToString());
}
方法3:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using (SqlDataReader reader = SqlDataSource1.Select(DataSourceSelectArguments.Empty) as SqlDataReader) | |
{ | |
while (reader != null && reader.Read()) | |
{ | |
reader["xxx"].ToString(); | |
} | |
} |
SqlDataSource.Select 方法 (System.Web.UI.WebControls)
JHPeng's Blog:宏觀篇。: SqlDataSource抓全部資料
FDZ Thread Recorder
標籤:
userscript
// ==UserScript==
// @name FDZ Thread Recorder
// @description 記錄已讀主題
// @author nightkid@FDZ
// @version 2012-05-25
// @run-at document-end
// @include http://forum.fdzone.org/forumdisplay.php?fid=*
// @include http://forum.*.fdzone.org/forumdisplay.php?fid=*
// @include http://pro.fdzone.org/forumdisplay.php?fid=*
// @include http://pro.*.fdzone.org/forumdisplay.php?fid=*
// ==/UserScript==
GM_addStyle('#GM_recordBtn {-moz-border-radius: 3px; background-color: #006699; color: #000000; cursor: pointer; font-size: 10px; height: 15px; position: fixed; right: 20px; top: 3px; width: 15px;}');
GM_addStyle('.GM_recorded td, .GM_recorded th {background-color:#006699 !important;}');
GM_registerMenuCommand('FDZ Thread Recorder - Show All Records',showAllRecords);
GM_registerMenuCommand('FDZ Thread Recorder - Clear Records Of This Forum',clearThisForum);
GM_registerMenuCommand('FDZ Thread Recorder - Remove Repetition',removeRepetition);
var removeStr=new RegExp ("(stick|normal)thread_","g");
var fid=location.href.replace(/.*fid=(\d{1,3}).*/,'$1'); //子區塊編號
function clearThisForum() {
if (confirm('Do you want to clear this forum?'))
{
window.localStorage.removeItem(fid);
GM_notification('Clear Records Of This Forum.',null);
}
}
function recordBtn() {
var btn = document.createElement("div");
btn.id="GM_recordBtn";
btn.title="Record all threads of this page.";
btn.accessKey="A";
document.getElementsByTagName("body")[0].appendChild(btn);
document.getElementById('GM_recordBtn').addEventListener('click',function(){ recordThisPage();},false);
}
function recordThisPage() {
var uids=document.querySelectorAll("tbody[id*=thread_]");
var tmp=[];
for(var i=0;uids[i];i++)
tmp.push(uids[i].id.replace(removeStr,""));
localStorage.setItem(fid, tmp.join() + checkNull(localStorage.getItem(fid)));
markThisPage();
removeRepetition();
}
function setThread(event) {
//記錄主題id並上色
//em → th → tr → tbody
var tidEle=document.getElementById(event.target.parentNode.parentNode.parentNode.id);
localStorage.setItem(fid, tidEle.id.replace(removeStr,"") + checkNull(localStorage.getItem(fid)));
tidEle.className="GM_recorded";
GM_notification('Recorded.',null);
}
//trigger設定事件
function setThreadEvent() {
var t=document.querySelectorAll('tbody[id] >tr > th > em');
for(var i=0;i < t.length;i++)
{
t[i].addEventListener('click',setThread,false);
t[i].style.cursor='pointer';
}
}
function removeRepetition() {
if (localStorage.getItem(fid) != null)
{
var allRecords=localStorage.getItem(fid).split(",");
var tmp=[];
for(var i=0;i < allRecords[i];i++)
{
var tmpRegx=new RegExp(allRecords[i],"g");
if (!( tmpRegx.test(tmp)))
tmp.push(allRecords[i]);
}
localStorage.setItem(fid,tmp.join());
GM_notification("Delete " + (allRecords.length - tmp.length) + " Repetition(s)");
}
}
function markThisPage() {
if (localStorage.getItem(fid) != null)
{
var allRecords=localStorage.getItem(fid);
var uids=document.querySelectorAll("tbody[id*=thread_]");
for(var i=0;uids[i];i++)
if (allRecords.indexOf(uids[i].id.replace(removeStr,"")) != -1)
uids[i].className="GM_recorded";
}
}
function showAllRecords() {
console.log(localStorage);
}
function checkNull() {
return (arguments[0] == null)?"":("," + arguments[0].split(","));
}
/*function delAllRecords() {
localStorage.clear();
GM_notification('Delete all records.');
}*/
setThreadEvent();
recordBtn();
markThisPage();
訂閱:
文章
(
Atom
)