history.back();
2012年12月17日
2012年12月14日
Visual Studio 佈景主題
Studio Style
Tool -> Option -> Environment -> Import and Export Settings -> Use teams settings file:
Tool -> Option -> Environment -> Import and Export Settings -> Use teams settings file:
2012年12月12日
2012年12月11日
AJax Loading
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="test.aspx.cs" Inherits="Pages_test" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script type="text/javascript" src="<%=Page.ResolveUrl("~/") %>js/jquery-1.8.3.min.js"></script>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
<img id="img1" src="<%=Page.ResolveUrl("~/") %>images/ajax-loader.gif" /><input id="btn1" type="button" value="Click" /><br />
<img id="img2" src="<%=Page.ResolveUrl("~/") %>images/ajax-loader.gif" /><input id="btn2" type="button" value="Click" /><br />
<img id="img3" src="<%=Page.ResolveUrl("~/") %>images/ajax-loader.gif" /><input id="btn3" type="button" value="Click" /><br />
</div>
</form>
</body>
</html>
$(function () {
$('img').hide();
$('img').hide();
$('#btn1').click(function () {
$('#img1').show();
$.ajax({
url: "/mjib/Services/CaseManageServices.ashx",
type: 'POST',
cache: false,
data: {
OperationType: 'test'
},
success: function (response) {
$('#img1').hide();
},
error: function (response) {
$('#img1').hide();
}
});
});
$('#btn2').click(function () {
$('#img2').show();
$.ajax({
url: "/mjib/Services/CaseManageServices.ashx",
type: 'POST',
cache: false,
data: {
OperationType: 'test'
},
success: function (response) {
$('#img2').hide();
},
error: function (response) {
$('#img2').hide();
}
});
});
$('#btn3').click(function () {
$('#img3').show();
$.ajax({
url: "/mjib/Services/CaseManageServices.ashx",
type: 'POST',
cache: false,
data: {
OperationType: 'test'
},
success: function (response) {
$('#img3').hide();
},
error: function (response) {
$('#img3').hide();
}
});
});
});
</script>
2012年12月9日
2012年12月3日
SqlBulkCopy
using (SqlConnection Bulkconn = new SqlConnection(conn.ConnectionString))
{
Bulkconn.Open();
using (SqlBulkCopy sqlBC = new SqlBulkCopy(Bulkconn))
{
sqlBC.DestinationTableName = "dbo." + dt.TableName;
foreach (DataColumn dc in dt.Columns)
{
sqlBC.ColumnMappings.Add(dc.ColumnName, dc.ColumnName);
}
sqlBC.WriteToServer(dt);
}
}
Popbox
<div id="divAddFolder" class="hideUC">
<table>
<tr>
<td>
資料夾名稱
</td>
<td>
<input id="txtNewNodeName" type="text" />
</td>
</tr>
</table>
<input id="btnAddNode" type="button" value="確定" />
<input id="btnCancelAddNode" type="button" value="取消" />
</div>
function PopupboxAdd() {
$.blockUI({
message: $('#divAddFolder'),
css: {
top: ($(window).height() - 300) / 2 + 'px',
left: ($(window).width() - 300) / 2 + 'px',
width: '300px'
}
});
}
jqueyr.blockUI.js
popbox.js
p.s. popupbox 會使 asp.net runat server onclick無法執行
2012年10月24日
趨勢 #00
在做 Membership Tool凸槌後
先是被通知可能會被調去 loading比較輕的 SharePoint team
心情有點小受挫
今天 Yilin除了來幫我解決 session的問題
Renee也跟著來告訴我月底可能就會被調回公司的現實
比起面試時被告知不需要,這樣做了後才被認為能力不足 其實更讓我容易受傷 氣餒
加油吧 정신 자려!!
先是被通知可能會被調去 loading比較輕的 SharePoint team
心情有點小受挫
今天 Yilin除了來幫我解決 session的問題
Renee也跟著來告訴我月底可能就會被調回公司的現實
比起面試時被告知不需要,這樣做了後才被認為能力不足 其實更讓我容易受傷 氣餒
加油吧 정신 자려!!
IsNewSession
參考: [ASP.Net] Session.IsNewSession 與 Session.SessionID
佈署時要記得把 Global.asax放到根目錄底下 .....................
佈署時要記得把 Global.asax放到根目錄底下 .....................
2012年10月22日
2012年10月18日
Http Handler Web Service
.ashx
front-end
ajax ...
front-end
ajax ...
scuess(response):{
var result = eval(response); // trans text to json
}
ASP.NET Http Handler
使用 .ashx
HttpContext.Request["..."]
HttpContext.Response.ClearContent();
HttpContext.Response.ClearHeaders();
HttpContext.Response.Clear();
HttpContext.Response.ContentType = "application/json";
HttpContext.Response.Write(resultResponse);
HttpContext.Response.Flush();
HttpContext.Response.End();
web.config
<configuration>
<system.web>
<httpHandlers>
<add name="DownloadHandler" verb="*" path="*.zip" type="... .XXXHandler"/>
verb: get, post, ...
path: *, *.zip, *.jpg, ...
type: (namespace).(class name)
HttpContext.Request["..."]
HttpContext.Response.ClearContent();
HttpContext.Response.ClearHeaders();
HttpContext.Response.Clear();
HttpContext.Response.ContentType = "application/json";
HttpContext.Response.Write(resultResponse);
HttpContext.Response.Flush();
HttpContext.Response.End();
web.config
<configuration>
<system.web>
<httpHandlers>
<add name="DownloadHandler" verb="*" path="*.zip" type="... .XXXHandler"/>
verb: get, post, ...
path: *, *.zip, *.jpg, ...
type: (namespace).(class name)
2012年10月17日
2012年10月16日
1012 Meeting Record With Yilin
1. 對自己要求時程縮短一半 才有足餘的時間去做修改
(MacGyver: 一個禮拜的切一道,或者切兩道、三道)
2. 試著只 build一次就過 不要邊 build邊找出 code內的語法錯誤等
3.
(MacGyver: 一個禮拜的切一道,或者切兩道、三道)
2. 試著只 build一次就過 不要邊 build邊找出 code內的語法錯誤等
3.
Umbraco Debug Mode
<compilation defaultLanguage="c#" debug="false" batch="false" targetFramework="4.0">
=>
<compilation defaultLanguage="c#" debug="true" batch="false" targetFramework="4.0">
=>
<compilation defaultLanguage="c#" debug="true" batch="false" targetFramework="4.0">