gridView sort
http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.gridview.sorting.aspx
dt.DefaultView.Sort = e.SortExpression + " " + GetSortDirection(e.SortExpression);
http://forums.asp.net/p/956540/1177923.aspx
文件夹链接的使用
http://stackoverflow.com/questions/855614/what-are-the-ways-to-make-an-html-link-open-a-folder
parameter question
http://msdn.microsoft.com/en-us/library/57hkzhy5.aspx
http://msdn.microsoft.com/en-us/library/57hkzhy5.aspx
http://msdn.microsoft.com/en-us/library/system.io.path_methods(v=vs.71).aspx
Path to deal combine FileName, DirectoryName
RowDataBound 事件
http://stackoverflow.com/questions/4427848/change-cell-color-on-different-values-gridview
http://stackoverflow.com/questions/2073982/c-sharp-help-to-set-a-row-css-class-of-a-grid-view
C-e C-c/u
Process 的输入输出编码问题
using (var process = new Process())
{
var encoding = Encoding.GetEncoding(852);
var psi = new ProcessStartInfo();
psi.FileName = "cmd";
psi.RedirectStandardInput = true;
psi.RedirectStandardOutput = true;
psi.UseShellExecute = false;
psi.StandardOutputEncoding = encoding;
process.StartInfo = psi;
process.Start();
using (var sr = process.StandardOutput)
using (var sw = new StreamWriter(process.StandardInput.BaseStream, encoding))
{
var command = "....";
sw.WriteLine(command);
// etc..
}
}
//At the time of creating the process:
_process = new Process
{
StartInfo =
{
FileName = application,
Arguments = arguments,
RedirectStandardInput = true,
RedirectStandardOutput = true,
StandardOutputEncoding = Encoding.UTF8,
StandardErrorEncoding = Encoding.UTF8,
UseShellExecute = false,
},
};
_process.StartInfo.Arguments = "";
_process.StartInfo.FileName = "UtfRedirect.exe"
//At the time of running the process
_process.Start();
//Write the name of the final slave exe to the stdin of UtfRedirector in UTF8
var bytes = Encoding.UTF8.GetBytes(application);
_process.StandardInput.BaseStream.Write(bytes, 0, bytes.Length);
_process.StandardInput.WriteLine();
//Write the arguments to be sent to the final slave exe to the stdin of UtfRedirector in UTF8
bytes = Encoding.UTF8.GetBytes(arguments);
_process.StandardInput.BaseStream.Write(bytes, 0, bytes.Length);
_process.StandardInput.WriteLine();
//Read the output that has been proxied with a forced codepage of UTF8
string utf8Output = _process.StandardOutput.ReadToEnd();
chcp